You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Dockerfile
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,17 +6,26 @@ MAINTAINER Barbara Hill <bhill@broadinstitute.org>
6
6
# While you are debugging/iterating over your module code in the Module integrator comment out the secion below.
7
7
# When you are done, export your module, unzip and move your source files into the src directory in this local workspace.
8
8
# Then, update this section for you module and build using the docker build command below - again updated for your module.
9
+
# Note that you only need to add gpuser if you base image (the image specified in FROM) is run as root. If it runs as another user, you may need to become root (USER root) to add folders...etc. Just make sure to switch back to the non-root user before exiting.
9
10
# -----------------------------------
11
+
#creating a non-root user - see above
12
+
RUN useradd -ms /bin/bash gpuser
13
+
USER newuser
14
+
WORKDIR /home/newuser
15
+
16
+
#switch back to root to create dir
17
+
USER root
10
18
RUN mkdir /ExampleModule \
11
19
&& chown gpuser /ExampleModule
12
20
21
+
#switch to non-root before exiting so that we don't run as root on the server.
0 commit comments