3 DL3007
Peter deHaan edited this page 2016-01-19 16:44:02 -08:00

Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag.

Problematic code:

FROM debian:latest

Correct code:

FROM debian:jessie

Rationale:

You can never rely that the latest tags is a specific version.

https://docs.docker.com/engine/userguide/dockerimages/

Tip: You recommend you always use a specific tagged image, for example ubuntu:12.04. That way you always know exactly what variant of an image is being used.