base image
The image a Dockerfile starts from with FROM, which supplies the operating system files and often a language runtime.
In more detail
Everything your Dockerfile adds is layered on top of it, so its contents, size and security updates become yours. Pinning it by digest keeps builds repeatable.
Examples
Rebuilding the same commit later can pick up a changed base image, one reason a rebuild counts as a different release.FROM golang:alpine AS buildFROM eclipse-temurin:21-jreRelated terms
- FROM — The Dockerfile instruction that picks the base image a build starts from.
- reproducible build — A build that produces the same result every time from the same inputs.
- minimal base image — A base image with as little inside as possible, such as Alpine, a slim variant or a distroless image, to shrink size and attack surface.
- Docker Official Image — A curated image on Docker Hub, such as alpine or python, maintained with documented, reviewed build files.
- patching — Updating software to a version that fixes known bugs or vulnerabilities.
- Eclipse Temurin — A free, widely used JDK distribution built from OpenJDK by the Eclipse Adoptium project, also published as official container images.
- tag — A human-readable label such as 3.20 or latest attached to an image in a repository, which can be moved to point at a different image.
- pinning — Fixing an exact version or digest of something you depend on so it cannot change without you noticing.
- Alpine Linux — A very small Linux distribution often used as a base image because it is only a few megabytes.
- Dockerfile — A text file of instructions, such as FROM, COPY and RUN, that tells Docker how to build an image.
- image scanning — Checking the packages inside an image against lists of known vulnerabilities.
Related guides
Taught in
- Building and Pushing Container Images — Continuous Integration & Continuous Delivery Pipelines
- Artifact Promotion: Staging to Production — Continuous Integration & Continuous Delivery Pipelines
- Container Images The Exam Way — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Design And Build: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Union Filesystems, Images And Writable Layers — Docker Architecture & Production Containers
- FROM, WORKDIR, COPY And ADD — Docker Architecture & Production Containers
- ARG, ENV, LABEL, EXPOSE And VOLUME — Docker Architecture & Production Containers
- Multi Stage Builds, Targets And Build Secrets — Docker Architecture & Production Containers
- Tags, Digests And Reproducible Image References — Docker Architecture & Production Containers
- Minimal Bases, Non Root Users And Smaller Images — Docker Architecture & Production Containers
- Scan, Patch And Inspect The Software Supply Chain — Docker Architecture & Production Containers
- Define The Service And Database With Compose — Docker Architecture & Production Containers
- Build, Test And Promote The Same Image In CI — Docker Architecture & Production Containers
- OpenTelemetry, Container Publishing and Trimming — Modern .NET Core, C# & Enterprise Microservices
- Shipping in Scratch and Distroless Images — Concurrent Systems Programming with Go
- Packaging Into A Container — Modern Java: Virtual Threads & High-Throughput Services
- Containerized Deployment: Multi-Stage Docker Builds — Next.js 15 & Modern App Router Architecture
- Lockfiles And Reproducible Builds — Application Security & Threat Modeling for Engineers
- Container Security: Minimal Bases And Non Root — Application Security & Threat Modeling for Engineers
- Image Scanning And Trivy — Application Security & Threat Modeling for Engineers
References
- Dockerfile best practices
- Base images (Docker docs)
- Dockerfile reference: FROM
- Dockerfile reference
- Docker docs: Multi-stage builds