Dockerfile 361 B

123456789101112
  1. FROM nginx:${NGINX_VERSION:-1.22}
  2. # Copy basic nginx configuration
  3. COPY nginx.conf /etc/nginx/nginx.conf
  4. # Health check (using wget which is available by default)
  5. HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
  6. CMD wget --no-verbose --tries=1 --spider http://localhost/ || exit 1
  7. EXPOSE 80 443
  8. CMD ["nginx", "-g", "daemon off;"]