From instruction
The FROM instruction is a Dockerfile directive that selects the base image or empty filesystem for a container image build stage.
.NET in Action, Second Edition
The FROM instruction selects a base image and begins a build stage in a Dockerfile.
- How it is used
- Starts Dockerfile image construction by selecting an existing image for subsequent modifications.
- How deep it goes
- Explains base-image selection, immutability, and multiple stages, then demonstrates SDK-to-runtime image transfer.
- Examples
- Uses .NET 6 SDK and ASP.NET images in single-stage and named multi-stage Dockerfiles.
- What you can do after
- Build it from scratch by selecting .NET base images in a Dockerfile and producing tagged images with docker build.
Read how .NET in Action, Second Edition explains from instruction →
Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more
The FROM directive specifies the base image or empty starting filesystem for a container image build.
- How it is used
- Establishes the filesystem and base layer on which subsequent image-building instructions operate.
- How deep it goes
- Explains required placement, scratch semantics, registry pulls, rootfs mounting, base layers, and multiple build stages.
- Examples
- Demonstrates FROM scratch, registry.access.redhat.com/ubi8, ubi8/httpd-24, and a two-step HTTP application build.
- What you can do after
- Build an image from an empty rootfs or selected base image using Podman and subsequent Containerfile instructions.
Road to Kubernetes
The FROM directive is a Dockerfile instruction that specifies the base container image for a build.
- How it is used
- Uses a prebuilt image to establish the starting environment for repeatable Docker container builds.
- How deep it goes
- Defines inheritance and version tags, but stops short of explaining image internals or advanced Dockerfile behavior.
- Examples
- Demonstrates Ubuntu with NGINX and versioned Python and Node.js runtime images.
- What you can do after
- Build it from scratch by selecting a runtime image and writing its FROM line with an appropriate version tag.
Related concepts
- container imageuses · A container image is a packaged filesystem and configuration artifact from which a container can be created and run.
- base imageuses · A base image is a container image that supplies the initial filesystem and environment from which another container image is built.
- multistage buildused by · A multistage build is a container-image construction technique that uses separate build stages and includes only selected artifacts in the final runtime image.
- Dockerfilepart of · A Dockerfile is a text file containing declarative instructions for building a container image and specifying its contents and runtime metadata.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.


