Interview Prep/Docker/Image design and Dockerfile decisions

A developer wants `latest` base images always. Your view?

BeginnerScenarioImage design and Dockerfile decisions
Answer

Situation read → latest is a moving target; builds become non-reproducible.

What I'd do → Pin to a specific minor version (python:3.12-slim-bookworm) and ideally to a digest: FROM python:3.12-slim-bookworm@sha256:.... Let Renovate or Dependabot open PRs to bump tags and digests.

Why → You get reproducible builds and reviewable upgrades, and security patches still flow through automated PRs.

Interview tip → Tag for readability, digest for immutability; use both together.

All Docker questions Roadmap: Docker & containers

More on Image design and Dockerfile decisions