Dockerfile instructions

Dockerfile FROM

Selects the starting filesystem and configuration for a stage. An image can instead be addressed by digest. Use reviewed native-platform base content; a tag alone is mutable. Record the reviewed manifest or index digest, actual platform and locally inspected image identity; stop on unresolved offline inputs.

Formal Syntax & Structure

docker syntaxdocker
FROM [--platform=<platform>] <image>[:<tag>] [AS <name>]

Parameters & Attributes

NameTypeDescription
imagestringBase image reference.
platformstringTarget platform override.
namestringOptional stage name.

Working Example

Example Snippetdocker
FROM busybox:1.37CMD ["echo", "base ready"]
Docker Reference