39 lines
927 B
Plaintext
39 lines
927 B
Plaintext
:image_type: Dockerfile
|
|
|
|
include::../common/description.adoc[]
|
|
|
|
== How to fix it
|
|
|
|
include::../common/how-to-fix.adoc[]
|
|
|
|
=== Code examples
|
|
|
|
==== Noncompliant code example
|
|
|
|
[source,docker,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
FROM my-image
|
|
FROM my-image:latest
|
|
----
|
|
|
|
==== Compliant solution
|
|
|
|
[source,docker,diff-id=1,diff-type=compliant]
|
|
----
|
|
FROM my-image:1.2.3
|
|
FROM my-image:1.2.3-alpine
|
|
----
|
|
|
|
include::../common/how-does-this-work.adoc[]
|
|
|
|
include::../common/extra-mile.adoc[]
|
|
|
|
== Resources
|
|
=== Documentation
|
|
|
|
* https://docs.docker.com/engine/reference/builder/#from[Dockerfile reference - FROM]
|
|
* https://docs.docker.com/develop/dev-best-practices/#how-to-keep-your-images-small[Docker development best practices]
|
|
* https://docs.docker.com/engine/reference/commandline/image_pull/#pull-an-image-by-digest-immutable-identifier[Pull an image by digest (immutable identifier)]
|
|
|
|
include::../common/implementation-specific.adoc[]
|