Browse Source

Cambios de usuario en Dockerfile

main
Celestino Rey 10 months ago
parent
commit
643038d9d7
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      Dockerfile

+ 6
- 2
Dockerfile View File

@ -1,5 +1,9 @@
FROM python:3.11.4-slim-buster
# Añadir usuario
RUN addgroup --system app && adduser --system --group app
# Add application sources with correct permissions for OpenShift
ENV APP_HOME=/app
RUN mkdir -p $APP_HOME/datos
@ -16,8 +20,8 @@ RUN pip install -U "pip>=19.3.1" && \
python $APP_HOME/manage.py migrate
WORKDIR $APP_HOME
RUN chown -R 1000770000:0 ./
USER 1000770000
RUN chown -R app:0 ./
USER app
EXPOSE 8080
# Run the application


Loading…
Cancel
Save