You want to know exactly what commands produced an image you did not build.
BeginnerScenarioImage design and Dockerfile decisions
Answer
Situation read → Image metadata keeps a build history.
What I'd do →
docker history --no-trunc --format '{{.CreatedBy}}' nginx:1.27
docker inspect nginx:1.27 | jq '.[0].Config'
For deeper layer content use dive nginx:1.27 or docker save and untar. For BuildKit images also docker buildx imagetools inspect --format '{{json .Provenance}}' image.
Why → History shows instructions; attestations give signed provenance when published.
Interview tip → History can be forged or squashed, so for trust use signatures and provenance.
More on Image design and Dockerfile decisions
A teammate's Node.js image is 1.2 GB. How do you approach shrinking it?BeginnerYou need to run `apt-get install` in a Dockerfile. How do you write it so the layer stays small and cache-safe?BeginnerWhen would you pick `COPY` over `ADD`?BeginnerA service must run a startup script and then the app. Should you use `CMD`, `ENTRYPOINT`, or both?BeginnerYour Docker build re-installs all Python dependencies on every code change. Fix it.BeginnerProduct asks for a container that runs both nginx and a Python app. What do you say?Beginner