1. [Home](<https://delaparra-services.nl/>) 
1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) 
1. [FROM](<https://delaparra-services.nl/knowledge-hub/from>)

  

Category: Docker 

# FROM

  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    

## What is FROM?

 

FROM: Sets the base image for the build stage. Must be the first instruction (after optional ARGs). Can appear multiple times in a multi-stage build. ` FROM ` is the first instruction in a Dockerfile. It sets the base image the build starts from, such as ` FROM php:8.4-fpm-alpine ` or ` FROM node:22-slim `. A Dockerfile can contain several ` FROM ` lines. Each starts a new stage in a multi-stage build. You might compile assets in a Node stage, install PHP dependencies in a Composer stage, and copy only the finished results into a small final image.

 

Definition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)

 

## Frequently asked questions about FROM

  

### What should you keep in mind with FROM?

 

Multi-stage builds keep production images small and free of build tools, which makes them faster to deploy and gives attackers less to work with. Name your stages with ` AS `, as in ` FROM node:22 AS assets `, so later ` COPY --from=assets ` lines are readable. Pin base image versions so builds are repeatable.

    

### What does an example of FROM look like?

 

```
FROM python:3.12-slim AS base
```

 

## At a glance

   CategoryDocker Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026

 

## More Docker terms

 

- [ENV](<https://delaparra-services.nl/knowledge-hub/env>) 
- [environment](<https://delaparra-services.nl/knowledge-hub/environment>) 
- [EXPOSE](<https://delaparra-services.nl/knowledge-hub/expose>) 
- [HEALTHCHECK](<https://delaparra-services.nl/knowledge-hub/healthcheck>) 
- [healthcheck (compose)](<https://delaparra-services.nl/knowledge-hub/healthcheck-compose>) 
- [host](<https://delaparra-services.nl/knowledge-hub/host>)

 

[All terms starting with F](<https://delaparra-services.nl/knowledge-hub#letter-f>)

 

## Skills

 

- ### Docker Build Strategies

 

Use this skill when writing, reviewing, or optimizing Dockerfiles, even if the user just says their image is too large, their build is slow, or they need to harden a container for production. Covers multi-stage builds, layer caching, .dockerignore, non-root users, and image size optimization.

 [View skill](<https://delaparra-services.nl/skills/docker-build-strategies>) [Download zip](<https://delaparra-services.nl/skills/docker-build-strategies/download>) 
- ### Multi Stage Dockerfile

 

'Create optimized multi-stage Dockerfiles for any language or framework'

 [View skill](<https://delaparra-services.nl/skills/multi-stage-dockerfile>) [Download zip](<https://delaparra-services.nl/skills/multi-stage-dockerfile/download>) 
- ### Docker Project Foundations

 

Use this skill when setting up, initializing, or Dockerizing a project, even if the user doesn't explicitly mention Docker but describes a need for containerized local development, adding a database or cache dependency, or running services without host-level installs. Covers Dockerfile, compose.yaml, and .dockerignore creation with Docker best practices.

 [View skill](<https://delaparra-services.nl/skills/docker-project-foundations>) [Download zip](<https://delaparra-services.nl/skills/docker-project-foundations/download>)

 [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/from/skills.zip>)

 

## Manuals

 

- [Docker for your Laravel app](<https://delaparra-services.nl/manuals/docker-voor-je-laravel-app>)

 

## Related services

 

- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)

Perhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.

 

## Need any help?

 

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.

  [Get in touch](<https://delaparra-services.nl/availability>)

[HTML version](https://delaparra-services.nl/knowledge-hub/from)
