Layerfiles can be composed, inherited from, and split into complex CI workflows.
Consider these three Layerfiles:
1. Layerfile at (repo root)/Layerfile
Layerfile
FROM vm/ubuntu:18.04RUN apt-get update && apt-get install postgresql python3
2. Layerfile at (repo root)/web/tests/Layerfile
Layerfile
FROM /LayerfileCOPY /web .RUN ./unittest.sh
3. Layerfile at (repo root)/web/Layerfile
Layerfile
FROM /LayerfileCOPY /web .RUN BACKGROUND ./start-webserver.shEXPOSE WEBSITE localhost:8080
When built, these three Layerfiles will automatically combine into a build
graph:Here, webapp.io has searched for files named ‘Layerfile’, discovered all three
of these files, and linked them based on their parents (by their FROM lines)There are many directives which can change the Layerfile graph, see SPLIT,
BUTTON, and WAIT below for some examples.
{"docsConfig":{"$schema":"https://mintlify.com/docs.json","theme":"mint","name":"Webapp.io Documentation","colors":{"primary":"#1038C7","light":"#9CC6F8","dark":"#112B87"},"favicon":"/favicon.png","logo":{"light":"https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/logo/light.svg?fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=b9d9cb419c9a72ddc2b1ba4334ff5a9e","dark":"https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/logo/dark.svg?fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=1e17d76a8119868825c45daa3dcd36b1","href":"https://webapp.io"},"background":{"decoration":null,"color":{"light":null,"dark":"#151515"}},"navbar":{"links":[{"label":"Sign In","href":"https://webapp.io/login"}],"primary":{"type":"button","label":"Sign Up","href":"https://webapp.io/sign-up"}},"footer":{"socials":{"twitter":"https://twitter.com/webappio","instagram":"https://www.instagram.com/webapp.io","hacker-news":"https://news.ycombinator.com/from?site=webapp.io"}},"integrations":{"mixpanel":{"projectToken":"9216fddb2a6d3f348c9d9e149ef830ba"}},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"webappio","hasAudioNarration":false,"actualSubdomain":"webappio","customDomains":["docs.webapp.io"],"gitSource":{"type":"github","owner":"webappio","repo":"docs","deployBranch":"main","contentDirectory":"docs","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a20c34100c8336c6f4e4a06","collectionId":"fbbc10e6-d9d3-4d0a-bccc-4474e558484f","schemaVersion":"v2"},"entitlements":{},"buildId":"6a20c34100c8336c6f4e4a06:success","clientVersion":"0.0.3939","searchFilterCounts":[{"language":"default","tag":"Documentation","count":67},{"language":"default","tag":"Examples","count":26},{"language":"default","tag":"Layerfile Reference","count":23},{"language":"default","tag":"Advanced Workflows","count":7},{"language":"default","tag":"Customize Notifications","count":7},{"language":"default","tag":"Integrations","count":7},{"language":"default","tag":"Hosting","count":6},{"language":"default","tag":"Home","count":4},{"language":"default","tag":"API Docs","count":3},{"language":"default","tag":"Common Problems","count":3}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"layerfile-reference/layerfile-graph","slug":"/layerfile-reference/layerfile-graph","pageMetadata":{"title":"Multiple build steps: The Layerfile graph","sidebarTitle":"Multiple Layerfiles","description":"Layerfiles can be composed, inherited from, and split into complex CI workflows.","href":"/layerfile-reference/layerfile-graph"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Layerfiles can be composed, inherited from, and split into complex CI workflows.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={code:`code`,h5:`h5`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,OptimizedImage}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Consider these three Layerfiles:`}),`\n`,_jsx(_components.h5,{children:`1. Layerfile at (repo root)/Layerfile`}),`\n`,_jsx(CodeBlock,{filename:`Layerfile`,numberOfLines:`2`,language:`docker`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`docker`,children:_jsxs(_components.code,{language:`docker`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` vm/ubuntu:18.04`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` apt-get update \u0026\u0026 apt-get install postgresql python3`})]}),`\n`]})})}),`\n`,_jsx(_components.h5,{children:`2. Layerfile at (repo root)/web/tests/Layerfile`}),`\n`,_jsx(CodeBlock,{filename:`Layerfile`,numberOfLines:`3`,language:`docker`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`docker`,children:_jsxs(_components.code,{language:`docker`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /Layerfile`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`COPY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /web .`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ./unittest.sh`})]}),`\n`]})})}),`\n`,_jsx(_components.h5,{children:`3. Layerfile at (repo root)/web/Layerfile`}),`\n`,_jsx(CodeBlock,{filename:`Layerfile`,numberOfLines:`4`,language:`docker`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`docker`,children:_jsxs(_components.code,{language:`docker`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`FROM`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /Layerfile`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`COPY`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` /web .`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`RUN`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` BACKGROUND ./start-webserver.sh`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`EXPOSE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` WEBSITE localhost:8080`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`When built, these three Layerfiles will automatically combine into a build\ngraph:`}),`\n`,_jsx(OptimizedImage,{src:`https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=a7e5e0f1efc18f18a0fa946d137645b3`,alt:`Advanced workflow graph example`,\"data-og-width\":`291`,width:`291`,\"data-og-height\":`118`,height:`118`,\"data-path\":`resources/advanced-workflows-intro-graph.svg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=280\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=f953feaea5009ce1a72c8201c40c50b4 280w, https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=560\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=8c1d6d0cd478d2d81b353566e3aeea46 560w, https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=840\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=b40a4bc50507f39cb09b6a1572c5e5ba 840w, https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=1100\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=6511991c1f960d6f8be14c75c2338b7b 1100w, https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=1650\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=172b795a0bd3863a04c5096cd61c7c24 1650w, https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/resources/advanced-workflows-intro-graph.svg?w=2500\u0026fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=a72cee6654e04b7b7ceb45f0dd7c7bad 2500w`}),`\n`,_jsx(_components.p,{children:`Here, webapp.io has searched for files named ‘Layerfile’, discovered all three\nof these files, and linked them based on their parents (by their FROM lines)`}),`\n`,_jsxs(_components.p,{children:[`There are many directives which can change the Layerfile graph, see `,_jsx(_components.code,{children:`SPLIT`}),`,\n`,_jsx(_components.code,{children:`BUTTON`}),`, and `,_jsx(_components.code,{children:`WAIT`}),` below for some examples.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Multiple build steps: The Layerfile graph","sidebarTitle":"Multiple Layerfiles","description":"Layerfiles can be composed, inherited from, and split into complex CI workflows.","href":"/layerfile-reference/layerfile-graph"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"subdomain":"webappio","siteName":"Webapp.io Documentation","title":"Multiple build steps: The Layerfile graph - Webapp.io Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-06T22:40:59.623Z","originalFileLocation":"layerfile-reference/layerfile-graph.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Layerfiles can be composed, inherited from, and split into complex CI workflows.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Webapp.io Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Multiple build steps: The Layerfile graph - Webapp.io Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Layerfiles can be composed, inherited from, and split into complex CI workflows.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Webapp.io Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.webapp.io/layerfile-reference/layerfile-graph\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://webappio.mintlify.app/_mintlify/api/og/v2?division=Layerfile+Reference\u0026amp;title=Multiple+build+steps%3A+The+Layerfile+graph\u0026amp;description=Layerfiles+can+be+composed%2C+inherited+from%2C+and+split+into+complex+CI+workflows.\u0026amp;theme=57024691cb73c292bd78980e\u0026amp;signature=8a6c864b5416fead22c7c3e72e05c64b4f5803e0f07c8209938fd0dbd3a7ab6b\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Multiple build steps: The Layerfile graph - Webapp.io Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Layerfiles can be composed, inherited from, and split into complex CI workflows.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://webappio.mintlify.app/_mintlify/api/og/v2?division=Layerfile+Reference\u0026amp;title=Multiple+build+steps%3A+The+Layerfile+graph\u0026amp;description=Layerfiles+can+be+composed%2C+inherited+from%2C+and+split+into+complex+CI+workflows.\u0026amp;theme=57024691cb73c292bd78980e\u0026amp;signature=8a6c864b5416fead22c7c3e72e05c64b4f5803e0f07c8209938fd0dbd3a7ab6b\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/webappio/iIEFoNTshUtPkS6u/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Webapp.io Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1038C7\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.webapp.io/layerfile-reference/layerfile-graph\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/layerfile-reference/layerfile-graph.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.webapp.io/#organization\",\"name\":\"Webapp.io Documentation\",\"url\":\"https://docs.webapp.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/webappio/s6-eR6DYSUsnelQ0/logo/light.svg?fit=max\u0026auto=format\u0026n=s6-eR6DYSUsnelQ0\u0026q=85\u0026s=b9d9cb419c9a72ddc2b1ba4334ff5a9e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.webapp.io#website\",\"name\":\"Webapp.io Documentation\",\"url\":\"https://docs.webapp.io\",\"publisher\":{\"@id\":\"https://docs.webapp.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph#webpage\",\"url\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph\",\"name\":\"Multiple build steps: The Layerfile graph\",\"description\":\"Layerfiles can be composed, inherited from, and split into complex CI workflows.\",\"dateModified\":\"2026-01-06T22:40:59.623Z\",\"isPartOf\":{\"@id\":\"https://docs.webapp.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Layerfile Reference\",\"item\":\"https://docs.webapp.io/layerfile-reference/what-are-layerfiles\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Multiple build steps: The Layerfile graph\",\"item\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph#article\",\"headline\":\"Multiple build steps: The Layerfile graph\",\"name\":\"Multiple build steps: The Layerfile graph\",\"description\":\"Layerfiles can be composed, inherited from, and split into complex CI workflows.\",\"url\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph\",\"mainEntityOfPage\":{\"@id\":\"https://docs.webapp.io/layerfile-reference/layerfile-graph#webpage\"},\"dateModified\":\"2026-01-06T22:40:59.623Z\",\"publisher\":{\"@id\":\"https://docs.webapp.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.webapp.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Webapp.io Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Webapp.io Documentation","nav":{"global":null,"anchors":[{"anchor":"Documentation","icon":"book-open","groups":[{"group":"Home","pages":[{"title":"Documentation","href":"/introduction"},{"title":"Why Webapp?","href":"/why-webapp"},{"title":"Installation \u0026 Tutorial","href":"/tutorial"},{"title":"Snapshots \u0026 Environment Lifecycles","href":"/snapshots"}]},{"group":"Comparisons","pages":[{"title":"webapp.io vs CircleCI","href":"/comparisons/comparison-circleci"},{"title":"webapp.io vs Github Actions","href":"/comparisons/comparison-github-actions"}]},{"group":"Layerfile Reference","pages":[{"title":"What are Layerfiles?","href":"/layerfile-reference/what-are-layerfiles"},{"title":"Linting a Layerfile","description":"webapp.io extensions to help with development","href":"/layerfile-reference/layerfile-linting"},{"title":"Multiple build steps: The Layerfile graph","sidebarTitle":"Multiple Layerfiles","href":"/layerfile-reference/layerfile-graph"},{"title":"Sharing configuration across repositories: The Layerfile Library","sidebarTitle":"The Layerfile Library","description":"Sharing configuration across repositories","href":"/layerfile-reference/library"},{"title":"BUILD ENV","href":"/layerfile-reference/build-env"},{"title":"BUTTON","href":"/layerfile-reference/button"},{"title":"CACHE","href":"/layerfile-reference/cache"},{"title":"CHECKPOINT","href":"/layerfile-reference/checkpoint"},{"title":"CLONE","href":"/layerfile-reference/clone"},{"title":"COPY","href":"/layerfile-reference/copy"},{"title":"ENV","href":"/layerfile-reference/env"},{"title":"EXPOSE WEBSITE","href":"/layerfile-reference/expose-website"},{"title":"FROM","href":"/layerfile-reference/from"},{"title":"LABEL","href":"/layerfile-reference/label"},{"title":"MEMORY","href":"/layerfile-reference/memory"},{"title":"RUN","href":"/layerfile-reference/run"},{"title":"SECRET ENV","href":"/layerfile-reference/secret-env"},{"title":"SETUP FILE","href":"/layerfile-reference/setup-file"},{"title":"SKIP REMAINING IF","href":"/layerfile-reference/skip-remaining-if"},{"title":"SPLIT","href":"/layerfile-reference/split"},{"title":"USER","href":"/layerfile-reference/user"},{"title":"WAIT","href":"/layerfile-reference/wait"},{"title":"WORKDIR","href":"/layerfile-reference/workdir"}]},{"group":"Common Problems","pages":[{"title":"Step Rerunning","href":"/common-problems/step-rerunning"},{"title":"Lock during Run Repeatable","href":"/common-problems/lock-run-repeatable"},{"title":"Yarn Error","href":"/common-problems/yarn-error"}]},{"group":"Tuning Performance","pages":[{"title":"The Layerfile Cache","href":"/tuning-performance/the-layerfile-cache"},{"title":"SPLIT","href":"/tuning-performance/split"},{"title":"RUN REPEATABLE","href":"/tuning-performance/run-repeatable"}]},{"group":"Advanced Workflows","pages":[{"title":"Layerfiles can set up a migrated database in 5 seconds","sidebarTitle":"Set up a Migrated Database in 5 Seconds","href":"/advanced-workflows/duplicate-vm"},{"title":"Docker Login","href":"/advanced-workflows/docker-login"},{"title":"Routing","href":"/advanced-workflows/routing"},{"title":"OAuth","href":"/advanced-workflows/oauth"},{"title":"Using Yarn","href":"/advanced-workflows/using-yarn"},{"title":"Groups and Permissions","href":"/advanced-workflows/groups-and-permissions"},{"title":"Layerfile Analytics","href":"/advanced-workflows/layerfile-analytics"}]},{"group":"API Docs","pages":[{"title":"Setup","href":"/api-docs/setup"},{"title":"CI Jobs","href":"/api-docs/ci-jobs"},{"title":"Layerfile Runners","href":"/api-docs/layerfile-runners"}]},{"group":"Customize Notifications","pages":[{"title":"Build Speed Chart","href":"/customize-notifications/build-speed-chart"},{"title":"Custom Scripts","href":"/customize-notifications/custom-scripts"},{"title":"Layerfile Status","href":"/customize-notifications/layerfile-status"},{"title":"Link to Preview Environment","href":"/customize-notifications/link-to-preview-environment"},{"title":"Performance Graphs for Specific Pages","href":"/customize-notifications/performance-graphs-for-specific-pages"},{"title":"Site Performance Graph","href":"/customize-notifications/site-performance-graph"},{"title":"Slack Notification Template","href":"/customize-notifications/slack-notification-template"}]},{"group":"Integrations","pages":[{"title":"ConfigCat","href":"/integrations/configcat"},{"title":"Coveralls","href":"/integrations/coveralls"},{"title":"Cypress","href":"/integrations/cypress"},{"title":"Doppler","href":"/integrations/doppler"},{"title":"Ghost Inspector","href":"/integrations/ghost-inspector"},{"title":"Reflect.run","sidebarTitle":"Reflect","href":"/integrations/reflect"},{"title":"Slack","href":"/integrations/slack"}]},{"group":"Hosting","pages":[{"title":"Introduction","href":"/hosting/introduction"},{"title":"Get Started","href":"/hosting/get-started"},{"title":"Tutorial","href":"/hosting/tutorial"},{"title":"Free Hosting","href":"/hosting/free-hosting"},{"title":"Hosting Domains","href":"/hosting/domains"},{"title":"Features and Comparables","href":"/hosting/features-and-comparables"}]},{"group":"Community","pages":[{"title":"Slack Channel","sidebarTitle":"Developer Slack Community","href":"/community/slack"},{"title":"Socials","sidebarTitle":"Technology Content","href":"/community/social-media"}]}]},{"anchor":"Examples","icon":"envelope-open-text","pages":[{"title":"Examples","href":"/examples/angular"}]},{"anchor":"Blog","href":"https://webapp.io/blog/","icon":"newspaper","color":{"light":"#0ea4e9","dark":"#0ea4e9"}},{"anchor":"Community","href":"https://join.slack.com/t/webappdevelopers/shared_invite/zt-12tklqflc-7y~sYb7K3kkLyqY_hHofXg","icon":"slack","color":{"light":"#0ea4e9","dark":"#0ea4e9"}}]},"title":"Multiple build steps: The Layerfile graph - Webapp.io Documentation","buildId":"dpl_5UDDZ9hnigTkoV7QtvQ39eUp84nu","deploymentId":"dpl_5UDDZ9hnigTkoV7QtvQ39eUp84nu","dynamics":["a74be98ba7"],"chunks":["zoom-image-lightbox-ChyC7Hte.js","PlusIcon-DXkY3IBj.js","lightbox-handle-r17bVUz3.js"]}