What is the docker FROM instruction in a dockerfile?
-
Docker documentation: https://docs.docker.com/engine/reference/builder/
FROM <image> [AS <name>]
FROM <image>[:<tag>] [AS <name>]
FROM <image>[@<digest>] [AS <name>]The Dockerfile is used for building containers via a series of docker instructions.
The docker instruction keywords do not have to be case-sensitive but that is the convention. This is to differentiate them from the arguments.
The instructions are read top, down.
A Dockerfile starts with the
FROM
instruction. The FROM instruction tells docker which base image to use to build from.The ARG instruction can be used before FROM but only to define arguments to FROM.
The # symbol is a comment, unless it is a valid parser directive.
© Lightnetics 2024