Browse Source

Actualizar 'Dockerfile'

main
creylopez 10 months ago
parent
commit
2bc45173aa
1 changed files with 11 additions and 2 deletions
  1. +11
    -2
      Dockerfile

+ 11
- 2
Dockerfile View File

@ -14,8 +14,18 @@ RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/
# copy the django code # copy the django code
COPY ./src ./app COPY ./src ./app
RUN addgroup nginx
RUN adduser nginx -g nginx
RUN chgrp -R 0 ./app && chmod -R g=u ./app RUN chgrp -R 0 ./app && chmod -R g=u ./app
RUN chgrp -R 0 /var/lib/nginx && chmod -R g=u /var/lib/nginx
RUN chown -R nginx:0 /var/cache/nginx && \
chown -R nginx:0 /var/log/nginx && \
chown -R nginx:0 /etc/nginx/conf.d
RUN touch /var/run/nginx.pid && \
chown -R nginx:0 /var/run/nginx.pid
USER nginx
# change our working directory to the django projcet roo # change our working directory to the django projcet roo
WORKDIR /app WORKDIR /app
@ -29,7 +39,6 @@ RUN python -m venv /opt/venv && \
# make our entrypoint.sh executable # make our entrypoint.sh executable
RUN chmod +x config/entrypoint.sh RUN chmod +x config/entrypoint.sh
RUN chmod u+s /usr/sbin/nginx
# execute our entrypoint.sh file # execute our entrypoint.sh file
CMD ["./config/entrypoint.sh"] CMD ["./config/entrypoint.sh"]

Loading…
Cancel
Save