j commited on
Commit
8ed8af9
1 Parent(s): 7a84f72

add cache dir before switching user

Browse files
Files changed (1) hide show
  1. Dockerfile +2 -2
Dockerfile CHANGED
@@ -30,6 +30,8 @@ RUN ln -s -f /usr/bin/python${PYTHON_VERSION} /usr/bin/python3 && \
30
  RUN groupadd -g $SERVICE_GID $SERVICE_USER && \
31
  useradd -u $SERVICE_UID -g $SERVICE_GID -d /app -s /usr/sbin/nologin $SERVICE_USER
32
 
 
 
33
  USER $SERVICE_USER
34
  WORKDIR /app
35
 
@@ -41,8 +43,6 @@ COPY --chown=$SERVICE_UID:$SERVICE_GID . /app
41
  COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui.css /app/swagger-ui-assets/swagger-ui.css
42
  COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui-bundle.js /app/swagger-ui-assets/swagger-ui-bundle.js
43
 
44
- RUN mkdir -p /app/.cache && chown -R $SERVICE_UID:$SERVICE_GID /app/.cache
45
-
46
  RUN python3 -m venv $POETRY_VENV && $POETRY_VENV/bin/pip install -U pip setuptools && \
47
  $POETRY_VENV/bin/pip install poetry==1.6.1
48
 
 
30
  RUN groupadd -g $SERVICE_GID $SERVICE_USER && \
31
  useradd -u $SERVICE_UID -g $SERVICE_GID -d /app -s /usr/sbin/nologin $SERVICE_USER
32
 
33
+ RUN mkdir -p /app/.cache && chown -R $SERVICE_UID:$SERVICE_GID /app
34
+
35
  USER $SERVICE_USER
36
  WORKDIR /app
37
 
 
43
  COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui.css /app/swagger-ui-assets/swagger-ui.css
44
  COPY --chown=$SERVICE_UID:$SERVICE_GID --from=swagger-ui /usr/share/nginx/html/swagger-ui-bundle.js /app/swagger-ui-assets/swagger-ui-bundle.js
45
 
 
 
46
  RUN python3 -m venv $POETRY_VENV && $POETRY_VENV/bin/pip install -U pip setuptools && \
47
  $POETRY_VENV/bin/pip install poetry==1.6.1
48