Do you pin Docker images for small projects, or just use latest?

November 19, 2026 4 answers
Asked by Rilvexa+4n

Pinning versions seems safer, but I worry about forgetting updates. Is latest reasonable for a side project, or is there a better middle ground?

Answers

_x67+drivnaro.4

I would pin images and use Renovate or Dependabot to propose updates. You still need to review and apply them, but you don't have to remember to check every image yourself.

Keeping those changes in version control also makes it easier to see what changed and revert an update if it causes trouble. Major upgrades are a good time to read the release notes rather than merging automatically.

Reply to this answer
Izzy

For a low-stakes project, latest is fine if you're willing to troubleshoot when an update breaks something. It's less appealing for services other people depend on, where a surprise change can be a bigger headache.

_a68!drimlavo.4:

Even with latest, you can check an update before applying it to something you rely on, like DNS or a wiki.

Reply to this answer
Trelzori-5b

A version tag is useful, but it isn't necessarily immutable. An image publisher can move a tag, so pulling postgres:16 later may get you different bits even though the tag hasn't changed.

If you need the exact same image again, pin the digest too, such as image:tag@sha256: followed by the digest. Keep a process for updating that digest, though. An old pinned image won't pick up security fixes on its own.

Reply to this answer
p.864~cobblehinge

A major or minor version tag can be a practical compromise. You may get fixes within that version line without automatically jumping to the next major release. Check how the particular project publishes tags, though, and remember that a moving tag still permits changes when you pull.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions