capNimo commited on
Commit
9df8495
1 Parent(s): 2f97760

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -10
Dockerfile CHANGED
@@ -18,15 +18,15 @@ WORKDIR /app
18
 
19
  # Create a non-privileged user that the app will run under.
20
  # See https://docs.docker.com/go/dockerfile-user-best-practices/
21
- # ARG UID=10001
22
- # RUN adduser \
23
- # --disabled-password \
24
- # --gecos "" \
25
- # --home "/nonexistent" \
26
- # --shell "/sbin/nologin" \
27
- # --no-create-home \
28
- # --uid "${UID}" \
29
- # appuser
30
 
31
  # Download dependencies as a separate step to take advantage of Docker's caching.
32
  # Leverage a cache mount to /root/.cache/pip to speed up subsequent builds.
@@ -37,7 +37,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
37
  python -m pip install -r requirements.txt
38
 
39
  # Switch to the non-privileged user to run the application.
40
- # USER appuser
41
 
42
  # Copy the source code into the container.
43
  COPY . .
 
18
 
19
  # Create a non-privileged user that the app will run under.
20
  # See https://docs.docker.com/go/dockerfile-user-best-practices/
21
+ ARG UID=10001
22
+ RUN adduser \
23
+ --disabled-password \
24
+ --gecos "" \
25
+ --home "/nonexistent" \
26
+ --shell "/sbin/nologin" \
27
+ --no-create-home \
28
+ --uid "${UID}" \
29
+ appuser
30
 
31
  # Download dependencies as a separate step to take advantage of Docker's caching.
32
  # Leverage a cache mount to /root/.cache/pip to speed up subsequent builds.
 
37
  python -m pip install -r requirements.txt
38
 
39
  # Switch to the non-privileged user to run the application.
40
+ USER appuser
41
 
42
  # Copy the source code into the container.
43
  COPY . .