📦Base Image
Also known as Parent Image, FROM Image, scratch Image
The first image a build starts from. It is named on the FROM line.
Think of it like
Think of it like a plain pizza base. You add your own toppings on top.
Example
Lucy's build file starts FROM python:3.13-slim. Her image gets Python and a small Linux system, then her code goes on top.
Why it matters
Most of an image's size, and most of its security holes, come from the base. Picking a small, fresh one helps with both.
Definition
Example code
dockerfile
FROM python:3.13-slim
COPY . /app
CMD ["python", "/app/main.py"]Common mistake
Key takeaways
- 1The FROM line. Names where the image starts.
- 2Most of the size. And most of the files to patch.
- 3Scratch is empty. Start from nothing at all.