FROM

The Dockerfile instruction that picks the base image a build starts from.

In more detail

Every Dockerfile starts with FROM (only ARG, comments and parser directives may come before it). FROM python:3.12-alpine means everything in that image is already underneath your first layer. A Dockerfile with several FROM lines is a multi-stage build, and each stage can be given a name that later stages copy from.

Examples

FROM alpine:3.20
FROM python:3.12-alpine AS base
FROM gcr.io/distroless/static-debian12
FROM eclipse-temurin:21-jdk AS build

Related terms

Taught in

References

Certification courses