Pattern: Use of untagged image
Issue: -
Prefer a tagged image, for example ubuntu:12.04
. That way you always know exactly what variant of an image is being used.
Example of incorrect code:
FROM debian
Example of correct code:
FROM debian:jessie
When the image name refers to a previously defined alias:
FROM debian:jessie as build
RUN build_script
FROM build as tests
RUN test_script
FROM debian:jessie
COPY --from=build foo .