mirror of
https://github.com/ArthurDanjou/handson-ml3.git
synced 2026-01-26 09:40:26 +01:00
Dockerfile argument to set container user UID
The UID of created user should be set to the UID of the user that will be running the image/container to set appropriate permissions on files within notebooks directory. Default 1000 should be ok for users using the default account created while installing linux.
This commit is contained in:
@@ -13,8 +13,9 @@ RUN conda install -y -c conda-forge \
|
||||
jupyter_contrib_nbextensions
|
||||
|
||||
ARG username
|
||||
ARG userid
|
||||
|
||||
RUN adduser ${username} --gecos '' --disabled-password && \
|
||||
RUN adduser ${username} --uid ${userid} --gecos '' --disabled-password && \
|
||||
echo "${username} ALL=(root) NOPASSWD:ALL" > /etc/sudoers.d/${username} && \
|
||||
chmod 0440 /etc/sudoers.d/${username}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user