Dockerfile 790 B

1234567891011121314151617181920212223242526
  1. # Static site for bchanot.fr
  2. # nginx:alpine serves index.html + CV (HTML + PDF).
  3. FROM nginx:1.27-alpine
  4. # Custom nginx config (gzip, cache, security headers).
  5. COPY nginx.conf /etc/nginx/conf.d/default.conf
  6. # Site assets.
  7. WORKDIR /usr/share/nginx/html
  8. RUN rm -rf ./*
  9. COPY index.html ./
  10. COPY CV_Bastien_Chanot.html ./
  11. COPY CV_Bastien_Chanot.pdf ./
  12. # Non-root hardening: nginx:alpine already drops privileges to "nginx" user
  13. # for worker processes. Master runs as root only to bind port 80 inside
  14. # the container — fine because the host port is the one exposed.
  15. EXPOSE 80
  16. # Basic healthcheck: nginx must serve index.html.
  17. HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  18. CMD wget -qO- http://127.0.0.1/ >/dev/null || exit 1
  19. CMD ["nginx", "-g", "daemon off;"]