Dockerfile: cut layers and size first
Give multi-stage build and time zone handling
Prompt
Copy it whole, then replace the brackets with your own contentHandle this code task: Dockerfile: cut layers and image size first. Code/error: [paste] Environment: [language/version/framework] Requirements: give multi-stage builds and time zone handling. Give your assessment first, then the changes, then how to verify.
Replace the text in [ ] with your own situation; ask long tasks in stages.
How to get better results
Read this before you fill it inUse when the image exceeds 1GB and builds are slow.
Give the conclusion and impact scope first, then only the changed snippets (no full files), and finally one check that proves it works. Flag risky spots separately.
A Node project image is 1.4G and takes 6 minutes to build; want it under 300M while keeping debugging ability.
No base image given, the slimming plan won't run Only cutting size, startup breaks from missing deps No multi-stage, build cache all invalidated
If problems remain after the fix, paste the new error and the changed snippet back; keep debugging on the original approach, don't switch approaches and rewrite.
More like this: Writing code prompts · All prompts