Write a Dockerfile for production
Write a lean, production-ready Dockerfile using multi-stage builds, a non-root user, and a HEALTHCHECK. Documents every non-obvious decision.
Preview
Copy prompt
Write a production-ready Dockerfile for a [Language/Framework] application using a multi-stage build. The final image should be as small as possible. Run the application process as a non-root user, set all necessary environment variables, expose the correct port, and add a meaningful HEALTHCHECK instruction. Add comments explaining any non-obvious decisions like layer ordering, base image choice, or build-stage boundaries.
More
DevOps
Prompts
