Step 09 of 9 30 min· intermediate
Step 9: Containerize & Ship
Generate a production Dockerfile and deploy to your hosting target.
Recommended prompts
Use one of these to do the work in your IDE
Open the template to read it in full. Click Copy prompt to grab it (with your stack values pre-filled where they apply) — then paste into Claude Code, Cursor, or wherever you build.
When you're done
Verify these in your own work before moving on
This is a checklist for you to mentally tick off in your repo and IDE — the site doesn't track it, you do.
- Multi-stage Dockerfile, non-root user, pinned base image
- Image builds clean with no warnings
- App boots in container locally
- Deployed to staging and smoke-tested
- Production deploy gated on staging green
Common pitfalls
What goes wrong at this step
- Running as root in the container — easy security gain by switching to a non-root user
- `COPY . .` instead of explicit paths — bloats the image and leaks secrets