Ramses II commited on
Commit
136dd39
·
1 Parent(s): 7182945
Files changed (1) hide show
  1. Dockerfile +5 -7
Dockerfile CHANGED
@@ -22,16 +22,14 @@ COPY entrypoint.sh /app/entrypoint.sh
22
  # Set the entrypoint script as executable
23
  RUN chmod +x /app/entrypoint.sh
24
 
25
- # Switch back to the original user
26
- RUN useradd -m -u 1000 user
27
- USER user
28
 
29
- # Set environment variables for user
30
- ENV HOME=/home/user
31
- ENV PATH=/home/user/.local/bin:$PATH
32
 
33
  # Set the working directory for the user
34
- WORKDIR $HOME/app
35
 
36
  # Expose the port 8888 for JupyterLab
37
  EXPOSE 8888
 
22
  # Set the entrypoint script as executable
23
  RUN chmod +x /app/entrypoint.sh
24
 
25
+ # Set the permissions for the app directory to the existing user
26
+ RUN chown -R ${NB_UID}:${NB_GID} /app
 
27
 
28
+ # Switch back to the original user
29
+ USER ${NB_UID}
 
30
 
31
  # Set the working directory for the user
32
+ WORKDIR /home/${NB_USER}/app
33
 
34
  # Expose the port 8888 for JupyterLab
35
  EXPOSE 8888