Dockerfile 893 B

12345678910111213141516171819202122232425262728293031
  1. #FROM python:3.14.2-alpine3.23
  2. FROM python:3.13.1-alpine3.21
  3. # install nginx y otras cosas
  4. RUN apk add nginx netcat-openbsd curl vim jq rsync pango pango-dev cairo postgresql-client bash glib fontconfig font-noto
  5. COPY ./src/requirements.txt requirements.txt
  6. RUN python3 -m pip install --upgrade pip
  7. RUN pip install --user --no-cache-dir -r requirements.txt
  8. COPY ./nginx/default.conf /etc/nginx/http.d/nginx.conf
  9. # link nginx logs to container stdout
  10. RUN ln -sf /dev/stdout /var/log/nginx/access.log && \
  11. ln -sf /dev/stderr /var/log/nginx/error.log && \
  12. chgrp -R 0 /var/lib/nginx && \
  13. chmod -R g=u /var/lib/nginx
  14. ENV PATH="/root/.local/bin:$PATH"
  15. # copy the django code
  16. COPY ./src ./app
  17. RUN chgrp -R 0 ./app && \
  18. chmod -R g=u ./app
  19. # change our working directory to the django projcet roo
  20. WORKDIR /app
  21. # execute our entrypoint.sh file
  22. CMD ["/app/config/entrypoint.sh"]