From f104acf04123f1f890ba2b143ad593990d30e177 Mon Sep 17 00:00:00 2001 From: Celestino Rey Date: Fri, 10 Jan 2025 19:35:14 +0100 Subject: [PATCH] Ajusto dockerfile para usuario app --- Dockerfile | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 511a6a2..4bd9a00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,14 +35,13 @@ FROM python:3.11.4-slim-buster # create directory for the app user -RUN mkdir -p /app +ENV APP_HOME=/app +RUN mkdir -p $APP_HOME/gestion_reservas/staticfiles # create the app user -#RUN addgroup --system app && adduser --system --group app +RUN addgroup --system app && adduser --system --group app # create the appropriate directories -ENV APP_HOME=/app -RUN mkdir -p $APP_HOME WORKDIR $APP_HOME # install system dependencies @@ -56,15 +55,14 @@ RUN pip install --no-cache /wheels/* # copy entrypoint.sh COPY ./entrypoint.sh . - # copy project COPY . $APP_HOME # chown all the files to the app user -#RUN chown -R app:app $APP_HOME +RUN chown -R app:app $APP_HOME # change to the app user -#USER app +USER app WORKDIR $APP_HOME/gestion_reservas # run entrypoint.sh