Update Dockerfile
Browse files- Dockerfile +4 -3
Dockerfile
CHANGED
@@ -23,6 +23,9 @@ RUN python3 -m pip install --upgrade pip
|
|
23 |
# Install requirements.txt
|
24 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
25 |
|
|
|
|
|
|
|
26 |
RUN useradd -ms /bin/bash user
|
27 |
RUN addgroup -g 1001 -S 1000
|
28 |
RUN adduser -u 1001 -S 1000 -G 1000
|
@@ -34,8 +37,6 @@ ENV TF_ENABLE_ONEDNN_OPTS=0
|
|
34 |
|
35 |
|
36 |
|
37 |
-
# Set up a new user named "user" with user ID 1000
|
38 |
-
RUN useradd -u 1000 user
|
39 |
# Switch to the "user" user
|
40 |
USER user
|
41 |
# Set home to the user's home directory
|
@@ -44,7 +45,7 @@ ENV HOME=/home/user \
|
|
44 |
|
45 |
# Set the working directory to the user's home directory
|
46 |
#WORKDIR $HOME/app
|
47 |
-
RUN chmod 755 /app
|
48 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
49 |
COPY --chown=user . $HOME/app
|
50 |
#CMD ["python3", "-m", "app"]
|
|
|
23 |
# Install requirements.txt
|
24 |
RUN pip install --no-cache-dir --upgrade -r requirements.txt
|
25 |
|
26 |
+
# Set up a new user named "user" with user ID 1000
|
27 |
+
RUN useradd -u 1000 user
|
28 |
+
|
29 |
RUN useradd -ms /bin/bash user
|
30 |
RUN addgroup -g 1001 -S 1000
|
31 |
RUN adduser -u 1001 -S 1000 -G 1000
|
|
|
37 |
|
38 |
|
39 |
|
|
|
|
|
40 |
# Switch to the "user" user
|
41 |
USER user
|
42 |
# Set home to the user's home directory
|
|
|
45 |
|
46 |
# Set the working directory to the user's home directory
|
47 |
#WORKDIR $HOME/app
|
48 |
+
RUN chmod -R 755 /app
|
49 |
# Copy the current directory contents into the container at $HOME/app setting the owner to the user
|
50 |
COPY --chown=user . $HOME/app
|
51 |
#CMD ["python3", "-m", "app"]
|