{
    "url": "https://delaparra-services.nl/knowledge-hub/from",
    "locale": "en",
    "title": "FROM: Knowledge hub | DeLaParra Services",
    "description": "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.",
    "alternates": {
        "en": "https://delaparra-services.nl/knowledge-hub/from",
        "nl": "https://delaparra-services.nl/nl/kennisbank/from"
    },
    "formats": {
        "csv": "https://delaparra-services.nl/knowledge-hub/from.csv",
        "md": "https://delaparra-services.nl/knowledge-hub/from.md",
        "json": "https://delaparra-services.nl/knowledge-hub/from.json",
        "zip": "https://delaparra-services.nl/knowledge-hub/from.zip",
        "pdf": "https://delaparra-services.nl/knowledge-hub/from.pdf"
    },
    "downloads": [
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from.csv",
            "encodingFormat": "text/csv",
            "name": "from.csv"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from.json",
            "encodingFormat": "application/json",
            "name": "from.json"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from.md",
            "encodingFormat": "text/markdown",
            "name": "from.md"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from.pdf",
            "encodingFormat": "application/pdf",
            "name": "from.pdf"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from.zip",
            "encodingFormat": "application/zip",
            "name": "from.zip"
        },
        {
            "url": "https://delaparra-services.nl/knowledge-hub/from/skills.zip",
            "encodingFormat": "application/zip",
            "name": "from-skills.zip"
        }
    ],
    "markdown": "1. [Home](<https://delaparra-services.nl/>) \n1. [Knowledge hub](<https://delaparra-services.nl/knowledge-hub>) \n1. [FROM](<https://delaparra-services.nl/knowledge-hub/from>)\n\n  \n\nCategory: Docker \n\n# FROM\n\n  Explained by [Reinier de la Parra](<https://delaparra-services.nl/about>)  Updated November 25, 2026    \n\n## What is FROM?\n\n \n\nFROM: 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.\n\n \n\nDefinition source [Coders Lingo](<https://coderslingo.com/resources/open-dataset/>), [CC BY 4.0](<https://creativecommons.org/licenses/by/4.0/>)\n\n \n\n## Frequently asked questions about FROM\n\n  \n\n### What should you keep in mind with FROM?\n\n \n\nMulti-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.\n\n    \n\n### What does an example of FROM look like?\n\n \n\n```\nFROM python:3.12-slim AS base\n```\n\n \n\n## At a glance\n\n   CategoryDocker Explained by[Reinier de la Parra](<https://delaparra-services.nl/about>) UpdatedNovember 25, 2026\n\n \n\n## More Docker terms\n\n \n\n- [ENV](<https://delaparra-services.nl/knowledge-hub/env>) \n- [environment](<https://delaparra-services.nl/knowledge-hub/environment>) \n- [EXPOSE](<https://delaparra-services.nl/knowledge-hub/expose>) \n- [HEALTHCHECK](<https://delaparra-services.nl/knowledge-hub/healthcheck>) \n- [healthcheck (compose)](<https://delaparra-services.nl/knowledge-hub/healthcheck-compose>) \n- [host](<https://delaparra-services.nl/knowledge-hub/host>)\n\n \n\n[All terms starting with F](<https://delaparra-services.nl/knowledge-hub#letter-f>)\n\n \n\n## Skills\n\n \n\n- ### Docker Build Strategies\n\n \n\nUse 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.\n\n [View skill](<https://delaparra-services.nl/skills/docker-build-strategies>) [Download zip](<https://delaparra-services.nl/skills/docker-build-strategies/download>) \n- ### Multi Stage Dockerfile\n\n \n\n'Create optimized multi-stage Dockerfiles for any language or framework'\n\n [View skill](<https://delaparra-services.nl/skills/multi-stage-dockerfile>) [Download zip](<https://delaparra-services.nl/skills/multi-stage-dockerfile/download>) \n- ### Docker Project Foundations\n\n \n\nUse 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.\n\n [View skill](<https://delaparra-services.nl/skills/docker-project-foundations>) [Download zip](<https://delaparra-services.nl/skills/docker-project-foundations/download>)\n\n [Download all skills (zip)](<https://delaparra-services.nl/knowledge-hub/from/skills.zip>)\n\n \n\n## Manuals\n\n \n\n- [Docker for your Laravel app](<https://delaparra-services.nl/manuals/docker-voor-je-laravel-app>)\n\n \n\n## Related services\n\n \n\n- [Custom software and web applications](<https://delaparra-services.nl/services#service-03>)\n\nPerhaps your customers need somewhere to download their invoices, or your staff are managing bookings in a spreadsheet.\n\n \n\n## Need any help?\n\n \n\nStuck 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.\n\n  [Get in touch](<https://delaparra-services.nl/availability>)\n\n[HTML version](https://delaparra-services.nl/knowledge-hub/from)\n",
    "structured_data": {
        "@context": "https://schema.org",
        "@graph": [
            {
                "@type": "Organization",
                "@id": "https://delaparra-services.nl/#practice",
                "logo": "https://delaparra-services.nl/logo.png",
                "name": "DeLaParra Services",
                "legalName": "DeLaParra Services",
                "url": "https://delaparra-services.nl/",
                "description": "Bespoke software, web applications and mobile apps, developed in Laravel by a single developer in Groningen. Fixed price agreed in advance, full source code provided upon delivery.",
                "email": "info@delaparra-services.nl",
                "address": {
                    "@type": "PostalAddress",
                    "addressLocality": "Groningen",
                    "addressRegion": "Groningen",
                    "addressCountry": "NL"
                },
                "areaServed": "Groningen, the Netherlands",
                "knowsLanguage": [
                    "en",
                    "nl"
                ],
                "knowsAbout": [
                    "Web design and development",
                    "App development",
                    "Custom software and web applications",
                    "OpenSpec",
                    "AI code review",
                    "Your own coding agent"
                ],
                "founder": {
                    "@id": "https://delaparra-services.nl/#person"
                }
            },
            {
                "@type": "FAQPage",
                "@id": "https://delaparra-services.nl/knowledge-hub/from#webpage",
                "url": "https://delaparra-services.nl/knowledge-hub/from",
                "name": "FROM: Knowledge hub | DeLaParra Services",
                "description": "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.",
                "isPartOf": {
                    "@id": "https://delaparra-services.nl/#website"
                },
                "about": {
                    "@type": "DefinedTerm",
                    "@id": "https://delaparra-services.nl/knowledge-hub/from#term",
                    "name": "FROM",
                    "description": "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.",
                    "termCode": "from",
                    "url": "https://delaparra-services.nl/knowledge-hub/from",
                    "inLanguage": "en",
                    "keywords": "Docker",
                    "dateModified": "2026-11-25T17:46:26+00:00",
                    "inDefinedTermSet": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#terms"
                    },
                    "isPartOf": {
                        "@id": "https://delaparra-services.nl/knowledge-hub#dataset"
                    },
                    "subjectOf": [
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/from#webpage"
                        },
                        {
                            "@id": "https://delaparra-services.nl/knowledge-hub/from#dataset"
                        }
                    ]
                },
                "inLanguage": "en",
                "breadcrumb": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/from#breadcrumb"
                },
                "mainEntity": [
                    {
                        "@type": "Question",
                        "name": "What is FROM?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "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."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What should you keep in mind with FROM?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "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."
                        }
                    },
                    {
                        "@type": "Question",
                        "name": "What does an example of FROM look like?",
                        "acceptedAnswer": {
                            "@type": "Answer",
                            "text": "FROM python:3.12-slim AS base"
                        }
                    }
                ],
                "author": {
                    "@id": "https://delaparra-services.nl/#person"
                },
                "mentions": [
                    {
                        "@id": "https://delaparra-services.nl/skills/docker-build-strategies#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/multi-stage-dockerfile#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/skills/docker-project-foundations#skill"
                    },
                    {
                        "@id": "https://delaparra-services.nl/manuals/docker-voor-je-laravel-app#article"
                    }
                ]
            },
            {
                "@type": "BreadcrumbList",
                "@id": "https://delaparra-services.nl/knowledge-hub/from#breadcrumb",
                "itemListElement": [
                    {
                        "@type": "ListItem",
                        "position": 1,
                        "name": "Home",
                        "item": "https://delaparra-services.nl/"
                    },
                    {
                        "@type": "ListItem",
                        "position": 2,
                        "name": "Knowledge hub",
                        "item": "https://delaparra-services.nl/knowledge-hub"
                    },
                    {
                        "@type": "ListItem",
                        "position": 3,
                        "name": "FROM"
                    }
                ]
            },
            {
                "@type": "Person",
                "@id": "https://delaparra-services.nl/#person",
                "name": "Reinier de la Parra",
                "url": "https://delaparra-services.nl/about"
            },
            {
                "@type": "Dataset",
                "@id": "https://delaparra-services.nl/knowledge-hub/from#dataset",
                "name": "FROM",
                "description": "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.",
                "url": "https://delaparra-services.nl/knowledge-hub/from",
                "identifier": "https://delaparra-services.nl/knowledge-hub/from#dataset",
                "about": {
                    "@id": "https://delaparra-services.nl/knowledge-hub/from#term"
                },
                "creator": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "publisher": {
                    "@id": "https://delaparra-services.nl/#practice"
                },
                "license": "https://creativecommons.org/licenses/by/4.0/",
                "creditText": "Coders Lingo (https://coderslingo.com/resources/open-dataset/), CC BY 4.0",
                "isAccessibleForFree": true,
                "inLanguage": "en",
                "keywords": "Docker",
                "version": "2026-11-25",
                "dateModified": "2026-11-25T17:46:26+00:00",
                "isPartOf": {
                    "@type": "Dataset",
                    "@id": "https://delaparra-services.nl/knowledge-hub#dataset",
                    "name": "IT terms from A to Z",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "includedInDataCatalog": {
                    "@type": "DataCatalog",
                    "@id": "https://delaparra-services.nl/knowledge-hub#catalog",
                    "name": "Knowledge hub data catalog",
                    "url": "https://delaparra-services.nl/knowledge-hub"
                },
                "distribution": [
                    {
                        "@type": "DataDownload",
                        "name": "from.csv",
                        "encodingFormat": "text/csv",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from.csv",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "from.json",
                        "encodingFormat": "application/json",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from.json",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "from.md",
                        "encodingFormat": "text/markdown",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from.md",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "from.pdf",
                        "encodingFormat": "application/pdf",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from.pdf",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "from.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    },
                    {
                        "@type": "DataDownload",
                        "name": "from-skills.zip",
                        "encodingFormat": "application/zip",
                        "contentUrl": "https://delaparra-services.nl/knowledge-hub/from/skills.zip",
                        "inLanguage": "en",
                        "dateModified": "2026-11-25T17:46:26+00:00",
                        "license": "https://creativecommons.org/licenses/by/4.0/"
                    }
                ]
            }
        ]
    }
}