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.
Also covered in
- Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
- Build Financial Software with Generative AI (From Scratch)
- Learn Docker in a Month of Lunches, Second Edition
- Machine Learning Platform Engineering
What to know first
- containerA software container is an isolated execution environment that packages an application and its dependencies, typically sharing the host operating-system kernel.
- package.jsonpackage.json is the standard JSON manifest for an npm or Node.js package, declaring metadata, dependencies, scripts, entry points, and related configuration.
Related concepts
- container imageuses · A container image is a packaged filesystem and metadata 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.
- Dockerfilepart of · A Dockerfile is a text file containing instructions for building a Docker container image.
- multistage buildused by · A multistage build is a container-image construction technique that uses multiple build stages and transfers selected artifacts into a final stage, often separating build dependencies from runtime contents.
- instructionkind of · An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.
Questions about from instruction
What is from instruction?
The FROM instruction is a Dockerfile directive that selects the base image or empty filesystem for a container image build stage.
Which Manning books explain from instruction?
.NET in Action, Second Edition, Podman in Action: Secure, rootless containers for Kubernetes, microservices, and more and Road to Kubernetes.
What should I know before learning from instruction?
Manning books that teach from instruction usually introduce container and package.json first.
What is the difference between from instruction and FROM instruction?
The FROM instruction is a Dockerfile directive that selects the base image or empty filesystem for a container image build stage. A Modelfile instruction that selects the existing model from which a custom model is built.
What is from instruction a kind of?
From instruction is a kind of instruction. An instruction is a directive specifying an action, operation, task, constraint, or expected behavior for a person or computational system.
What is from instruction part of?
From instruction is part of Dockerfile. A Dockerfile is a text file containing instructions for building a Docker container image.
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.


