Run container as non-root user
Browse files- Dockerfile +3 -4
Dockerfile
CHANGED
@@ -122,10 +122,9 @@ WORKDIR /app/stable-diffusion-webui
|
|
122 |
RUN python launch.py --exit --skip-torch-cuda-test
|
123 |
|
124 |
# Run app as non-root user
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
# USER user
|
129 |
|
130 |
EXPOSE 7860
|
131 |
|
|
|
122 |
RUN python launch.py --exit --skip-torch-cuda-test
|
123 |
|
124 |
# Run app as non-root user
|
125 |
+
RUN adduser --disabled-password --gecos '' user
|
126 |
+
RUN chown -R user:user /app
|
127 |
+
USER user
|
|
|
128 |
|
129 |
EXPOSE 7860
|
130 |
|