Building Docker images can be one of the most time-consuming parts of your CI/CD pipeline.
Namespace runners accelerate your Docker builds through build distribution, layer caching, and integration with your existing workflows.
No configuration changes requiredThe fastest way to speed up your Docker builds is to simply switch to Namespace runners.
Remote Builders are enabled by default and will immediately accelerate your builds.
Note: If your workflow uses docker/setup-buildx-action, you need to remove or replace it.That’s it! Your builds are now running on high-performance Remote Builders with advanced caching.
Every build launched from your runners appears in the interface providing direct access to detailed logs, timing metrics, and performance analytics.
This visibility helps you understand exactly how much time Remote Builders are saving.
When looking at a slow build step, you can directly jump into the logs to understand which work was performed.
Head to Build Observability → to learn how to monitor build performance and identify bottlenecks.
While Remote Builders provide the best performance for most scenarios, in-runner builders (locally cached) excel when building massive images (10GB+).
Keeping the build local skips network transfer time.This section covers when to keep a build local. For caching container image pulls themselves, see Container Images.To enable this feature, just open the runner profile configuration and add a cache volume. Next, select Locally cached for your Docker builds.
Make sure to size your cache appropriately to benefit from a high cache hit ratio.
Using local caching does not lead to any additional compute usage beyond
the runner’s execution time itself. In order to make use of the feature,
including logging and tracing, each build made with local caching
counts towards the total build usage.
A common strategy to improve your build performance is the adoption of build cache mounts, allowing you to persist cache data across container builds and reduce build times significantly.With Namespace, your builds run in a shared, remote, high-performance builder by default, unlike on GitHub runners, where your docker builds run inside the runner.
This sharing means that you’ll see more cache hits across different builds, and hence faster builds.Cache mounts allow multi-writer access by default.
Some tools (e.g. apt) need exclusive access to its data.
To achieve this, you can select sharing=locked which makes concurrent builds wait for another.
When you want to test a build without pushing or loading it, use the cacheonly output type.
This runs the full build and populates the cache, but skips the export step:
Need to run hundreds of concurrent builds? Namespace supports full-fanout builds that can handle enterprise-scale build volumes without performance degradation.
Automatic scaling: Remote Builders support automatic scale-out to match your build volume
No queue bottlenecks: Parallel processing ensures builds start immediately
Dedicated compute: With dedicated Namespace compute, you get a fully consistent build performance experience
Contact support@namespace.so to discuss custom scaling configurations for your build volume requirements.
If you prefer to skip build caching altogether, you have two options:
Revert the Docker build context to the default: Namespace configures Remote Builders
as a separate buildxcontext. Before invoking a build that should not be cached, you can switch back to the
default by calling docker buildx use default. E.g.
jobs: build: steps: - name: Use default builder run: docker buildx use default - name: Build and push uses: docker/build-push-action@v5 with: context: . platforms: linux/amd64,linux/arm64
Disable Remote Builders: You can request that runners created for a
particular workflow job do not use Remote Builders.To disable Remote Builders, just open the runner profile configuration and select No caching for your Docker builds.
Remove setup-buildx-actionBecause Namespace runners are configured out of the box to use Remote Builders, there is no need to set up or configure buildx separately.
In fact, running docker/setup-buildx-action will overwrite the default configuration and prevent you from using Remote Builders.You can just remove docker/setup-buildx-action from your workflow entirely, or replace it with namespacelabs/nscloud-setup-buildx-action:
- name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 uses: namespacelabs/nscloud-setup-buildx-action@v0- uses: docker/build-push-action@v5 with: context: .
Multi-platform builds using Remote Builders don’t use emulation for AMD64 and ARM64 builds, instead building on these platforms natively.
This results in much better performance for multi-platform builds, and also means there is no need to set up QEMU.When using Remote Builders, you can safely remove docker/setup-qemu-action, too:
Traditional CI/CD requires complex caching strategies, but Namespace’s build infrastructure makes this unnecessary.
Namespace build solutions include maximum layer caching out of the box.
Using traditional GitHub Actions caching like cache-from/cache-to is superfluous when using Namespace builders and typically adds delays through remote file operations.You can remove them from your workflow definition:
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Namespace Documentation","colors":{"primary":"#1C32FF","light":"#1C32FF","dark":"#1C32FF"},"logo":{"light":"https://mintcdn.com/namespace-labs/qJGgMfy2GtyyZNVM/logo-light.svg?fit=max\u0026auto=format\u0026n=qJGgMfy2GtyyZNVM\u0026q=85\u0026s=fe139e3cd2f35a81098b6931347d8ed4","dark":"https://mintcdn.com/namespace-labs/qOJQ7kaWRgoS8lyv/logo-dark.svg?fit=max\u0026auto=format\u0026n=qOJQ7kaWRgoS8lyv\u0026q=85\u0026s=63702d83d8fb259023deb79db06aabbb","href":"https://namespace.so"},"favicon":"https://mintcdn.com/namespace-labs/MoefQ379UcpNU680/favicon.svg?fit=max\u0026auto=format\u0026n=MoefQ379UcpNU680\u0026q=85\u0026s=6f14a088da55e5f41847845796737353","appearance":{"default":"light","strict":true},"background":{"color":{"light":"#F8F9FB","dark":"#F8F9FB"}},"navbar":{"links":[{"href":"https://namespace.so/changelog","label":"Changelog"},{"href":"https://namespace.so/support","label":"Support"}],"primary":{"type":"button","label":"Log in","href":"https://cloud.namespace.so"}},"footer":{"socials":{"github":"https://github.com/namespacelabs","linkedin":"https://www.linkedin.com/company/namespacelabs","x":"https://x.com/namespacelabs"}},"fonts":{"family":"Inter","weight":400},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"interaction":{"drilldown":false},"metadata":{"timestamp":true},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"Changelog","icon":"history","href":"https://namespace.so/changelog"},{"anchor":"Trust Center (SOC2)","icon":"shield-check","href":"https://trust.namespace.so/"},{"anchor":"Status","icon":"activity","href":"https://namespace-status.com/"},{"anchor":"Support","icon":"message-circle","href":"https://namespace.so/support"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"namespace-labs","hasAudioNarration":false,"actualSubdomain":"namespace-labs","customDomains":["namespace.so"],"gitSource":{"type":"github","owner":"namespacelabs","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae0a8f6edbd4c098a94623c","collectionId":"a35c08e7-ddaf-4a3f-a338-cb38fc8b1e30","liveDeploymentHistoryId":"6ae0a8f6edbd4c098a94623c","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae1b6f59e6542c02e67c779","clientVersion":"0.0.3990","searchFilterCounts":[{"language":"default","tag":"Products","count":377},{"language":"default","tag":"CLI","count":166},{"language":"default","tag":"Command line","count":165},{"language":"default","tag":"Namespace CLI","count":131},{"language":"default","tag":"Documentation","count":104},{"language":"default","tag":"GitHub Actions","count":40},{"language":"default","tag":"Devbox CLI","count":34},{"language":"default","tag":"Integrations","count":33},{"language":"default","tag":"SDK","count":25},{"language":"default","tag":"Namespace SDK","count":23}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"workos-sso-scim","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},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"snippets/diagrams/styles.css","content":".ns-diagram{--ns-diagram-background:#ffffff;--ns-diagram-grid:#e5e7ee;--ns-diagram-border:#e5e7ee;--ns-diagram-card:#ffffff;--ns-diagram-neutral-zone:#fafbfc;--ns-diagram-brand-zone-start:rgba(28, 50, 255, 0.04);--ns-diagram-brand-zone-end:rgba(28, 50, 255, 0.07);--ns-diagram-brand-border:#c8ceff;--ns-diagram-heading:#202938;--ns-diagram-muted:#8892a6;--ns-diagram-copy:#4a5468;position:relative;width:100%;margin:2rem 0;padding:clamp(20px,3.5vw,32px);overflow:hidden;color:var(--ns-diagram-heading);background:var(--ns-diagram-background);border:1px solid var(--ns-diagram-border);border-radius:20px;box-shadow:0 1px 0 rgba(32,41,56,.04),0 1px 2px rgba(32,41,56,.06)}.dark .ns-diagram{--ns-diagram-background:#111827;--ns-diagram-grid:#374151;--ns-diagram-border:#374151;--ns-diagram-card:#1f2937;--ns-diagram-neutral-zone:#171f2d;--ns-diagram-brand-zone-start:rgba(107, 120, 255, 0.1);--ns-diagram-brand-zone-end:rgba(107, 120, 255, 0.16);--ns-diagram-brand-border:#4f5fc7;--ns-diagram-heading:#f3f4f6;--ns-diagram-muted:#aeb6c5;--ns-diagram-copy:#cbd5e1}.ns-diagram-grid-background{position:absolute;inset:0;pointer-events:none;background-image:radial-gradient(circle,var(--ns-diagram-grid) 1px,transparent 1px);background-size:16px 16px;opacity:.5;mask-image:linear-gradient(180deg,transparent 0,#000 10%,#000 90%,transparent 100%)}.ns-diagram-content{position:relative}.ns-diagram-caption{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.ns-diagram-mark{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;margin:0;border-radius:8px}.ns-diagram-mark-anthropic{color:#d97757;background:#fcefe8}.ns-diagram-mark-devin{color:#4338ca;background:#eef0ff}.ns-diagram-mark-cursor{color:#111827;background:#eef0f3}.ns-diagram-mark-control{color:#1c32ff;background:#e0e7ff}.ns-diagram-mark-terminal{color:#fff;background:#202938}.ns-diagram-mark-worker{color:#4338ca;background:#eef1ff}.ns-diagram-zone{position:relative;display:flex;flex-direction:column;padding:1.25rem;background:var(--ns-diagram-neutral-zone);border:1px dashed #d2d6e0;border-radius:14px}.dark .ns-diagram-zone{border-color:#4b5563}.ns-diagram-zone-brand{background:linear-gradient(180deg,var(--ns-diagram-brand-zone-start),var(--ns-diagram-brand-zone-end));border:1px solid var(--ns-diagram-brand-border)}.ns-diagram-zone-header{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem;color:var(--ns-diagram-copy);font-size:11px;font-weight:600;letter-spacing:.1em;text-transform:uppercase}.ns-diagram-zone-center{display:flex;flex:1;align-items:center}.ns-diagram-zone-center>*{width:100%}.ns-diagram-card{position:relative;display:flex;align-items:center;gap:1rem;min-width:0;padding:1rem 1.25rem;background:var(--ns-diagram-card);border:1px solid var(--ns-diagram-border);border-radius:12px;box-shadow:0 1px 0 rgba(32,41,56,.04),0 1px 2px rgba(32,41,56,.06)}.ns-diagram-card-brand{border-color:var(--ns-diagram-brand-border)}.ns-diagram-card-copy{display:flex;min-width:0;flex-direction:column}.ns-diagram-card-label{color:var(--ns-diagram-heading);font-size:16px;font-weight:600;line-height:1.25;letter-spacing:-.01em}.ns-diagram-card-sublabel{margin-top:.125rem;color:var(--ns-diagram-muted);font-size:12px;line-height:1.35}.ns-managed-layout{display:grid;grid-template-columns:1fr auto 1.05fr;align-items:stretch}.ns-managed-connector{display:flex;width:64px;flex-direction:column;align-items:center;justify-content:center;padding:0 .25rem;color:var(--ns-diagram-muted);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10.5px}.ns-managed-connector>span{margin-bottom:.375rem}.ns-managed-connector-path{display:flex;width:56px;align-items:center}.ns-managed-connector-line{flex:1;height:1.5px;background:#d2d6e0}.ns-managed-connector-arrow{border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid #d2d6e0}.ns-mini-connector{display:flex;flex-direction:column;align-items:center;padding:.375rem 0}.ns-mini-connector>div{width:1.5px;height:12px;background:var(--ns-diagram-brand-border)}.ns-mini-connector>span{border-top:7px solid var(--ns-diagram-brand-border);border-right:5px solid transparent;border-left:5px solid transparent}.ns-devin-devboxes,.ns-devin-sessions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1.5rem}.ns-devin-mobile-layout{display:none}.ns-devin-connectors,.ns-devin-connectors>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.ns-devin-connectors{gap:1.5rem}.ns-devin-connectors>div{padding:0 1rem}.ns-devin-connector{position:relative;display:flex;min-height:110px;align-items:center;justify-content:center;color:var(--ns-diagram-copy);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10px;line-height:1.25;text-align:center}.ns-devin-management-connector{min-height:70px;color:#6366f1}.ns-devin-connector-line{position:absolute;top:0;bottom:0;left:50%;width:1.5px;background:#d2d6e0;transform:translateX(-50%)}.ns-devin-management-connector .ns-devin-connector-line,.ns-diagram-connector-dashed .ns-diagram-vertical-line{width:0;background:0 0;border-left:1.5px dashed var(--ns-diagram-brand-border)}.ns-devin-connector>span,.ns-diagram-vertical-connector>span{position:relative;z-index:1;padding:0 .375rem;background:var(--ns-diagram-background)}.ns-control-plane-pill{display:flex;align-items:center;align-self:center;gap:.375rem;margin-bottom:1rem;padding:.375rem .75rem;color:#4338ca;background:#eef1ff;border:1px solid var(--ns-diagram-brand-border);border-radius:999px;font-size:12px;font-weight:500}.ns-diagram-vertical-connector{position:relative;display:flex;align-items:center;justify-content:center;color:var(--ns-diagram-copy);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:10px;line-height:1.25;text-align:center}.ns-diagram-vertical-line{position:absolute;top:0;bottom:0;left:50%;width:1.5px;background:#d2d6e0;transform:translateX(-50%)}.ns-diagram-connector-dashed{color:#6366f1}.ns-diagram-arrow-down{position:absolute;bottom:0;left:50%;border-top:8px solid #d2d6e0;border-right:5px solid transparent;border-left:5px solid transparent;transform:translateX(-50%)}.ns-devin-management-connector .ns-diagram-arrow-down,.ns-diagram-connector-dashed .ns-diagram-arrow-down{border-top-color:var(--ns-diagram-brand-border)}.ns-bazel-connector-inset{padding:0 1rem}.ns-bazel-workers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}@media (max-width:767px){.ns-managed-layout{grid-template-columns:1fr}.ns-managed-connector{position:relative;width:auto;min-height:64px;padding:.5rem 0}.ns-managed-connector-path{width:auto;flex-direction:column}.ns-managed-connector-line{width:1.5px;height:24px;flex:none}.ns-managed-connector-arrow{border-top:9px solid #d2d6e0;border-right:6px solid transparent;border-bottom:0;border-left:6px solid transparent}.ns-devin-connectors,.ns-devin-devboxes,.ns-devin-sessions{grid-template-columns:1fr}.ns-devin-desktop-layout{display:none}.ns-devin-mobile-layout{display:block}.ns-devin-mobile-lane+.ns-devin-mobile-lane{margin-top:1.5rem;padding-top:1.5rem;border-top:1px solid var(--ns-diagram-border)}.ns-devin-mobile-connectors{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));padding:0 .5rem}.ns-devin-connector{min-height:80px}.ns-bazel-workers{grid-template-columns:1fr}}"},{"filePath":"style.css","content":":root{--namespace-radius-inline:2px;--namespace-radius-control:2px;--namespace-radius-container:4px;--ns-paper:#f8f9fb;--ns-well:#f1f2f6;--ns-well-hover:#eaecf2;--ns-raised:#fbfbfd;--ns-ink:#171c2b;--ns-body:rgb(23 28 43 / 0.7);--ns-quiet:#60689f;--ns-hairline:rgb(23 28 43 / 0.1);--ns-hairline-strong:rgb(23 28 43 / 0.2);--ns-blue:#1c32ff;--ns-blue-hover:#1428e0}#content-container,.almond-layout>div,.card,.chat-assistant-floating-input>div,.code-block,.frame,.pagination-next,.pagination-prev{border-radius:var(--namespace-radius-container)}.code-block [data-component-part=code-block-root],.frame>div{border-radius:inherit}#assistant-entry,#chat-assistant-textarea,#search-bar-entry,#search-input,.callout,.frame>.relative{border-radius:var(--namespace-radius-control)}.code-block-fade-overlay{border-radius:0 var(--namespace-radius-container) var(--namespace-radius-container) 0}#page-context-menu>button:first-child{border-radius:var(--namespace-radius-control) 0 0 var(--namespace-radius-control)}#page-context-menu>button:last-child{border-radius:0 var(--namespace-radius-control) var(--namespace-radius-control) 0}#content :not(pre)>code,#navigation-items li>a,#navigation-items li>button{border-radius:var(--namespace-radius-inline)}#navigation-items .nav-anchor>:is(svg, img),#navigation-items .sidebar-group-icon,#navigation-items [data-component-part=scroll-area-content]:has(>ul.nav-anchors),#navigation-items li>:is(a, button)>div[class~=\"h-[1lh]\"]:first-child{display:flex;flex-direction:column}#navigation-items [data-component-part=scroll-area-content]>ul.nav-anchors{order:1;margin-top:1rem;padding-top:1rem;border-top:1px solid color-mix(in srgb,currentColor 10%,transparent)}#navigation-items [data-component-part=scroll-area-content]>ul.sidebar-group{margin-top:.5rem}#navigation-items [data-component-part=scroll-area-content]>ul.sidebar-group+div{margin-top:1rem}.tab-container{overflow:hidden;padding:0 1rem 1rem;border:1px solid color-mix(in srgb,currentColor 12%,transparent);border-radius:var(--namespace-radius-container)}.tab-container [data-component-part=tab-content]>[data-table-wrapper]:last-child{margin-bottom:0;padding-bottom:0}#content .katex-display>.katex{text-align:left}.compact-table table td{min-width:0}#navigation-items ul.sidebar-group>li.space-y-px+li.space-y-px{margin-top:.75rem}#navigation-items .my-2>.sidebar-group-header{margin-bottom:.625rem;font-size:.8125rem;line-height:1.625rem;font-weight:600;letter-spacing:-.02em;text-transform:none;opacity:1}#navigation-items ul.sidebar-group>li.space-y-px>button{font-size:.8125rem;font-weight:600;letter-spacing:-.02em;background-color:transparent}#navigation-items ul.sidebar-group>li.space-y-px>button:hover,#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button:hover{background-color:color-mix(in srgb,currentColor 6%,transparent)}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button,#navigation-items ul.sidebar-group>li.space-y-px>ul>li>a{padding-left:3rem!important;font-size:.8125rem;font-weight:400;letter-spacing:-.02em}#navigation-items li[data-active-nav-item=true]>a,#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>ul>li[data-active-nav-item=true]>a,#navigation-items ul.sidebar-group>li.space-y-px>ul>li[data-active-nav-item=true]>a{color:var(--ns-blue)!important;background-color:var(--ns-well)!important}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button{background-color:transparent}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>button>div[class~=\"h-[1lh]\"]:first-child{margin-left:-1.75rem}#navigation-items ul.sidebar-group>li.space-y-px>ul>li.space-y-px>ul>li>a{padding-left:4rem!important;font-size:.8125rem;font-weight:400;letter-spacing:-.02em}@media (min-width:1024px){#sidebar-content{width:calc(16.5rem + 10px)}#content-container{margin-left:calc(16.5rem + 10px)}#navbar{container-type:inline-size}#navbar .nav-tabs{position:fixed;top:0;left:20rem;height:3.5rem;column-gap:2rem}#navbar div:has(>div>.nav-tabs){justify-content:flex-end}@container (max-width: 69rem){#navbar .navbar-link:has(>a[href=\"https://namespace.so/changelog\"]){display:none}}}@media (min-width:1280px){#content-container{padding-right:1.5rem;padding-left:3rem}#content-container>div{column-gap:1.5rem;justify-content:flex-start}#content-area{width:calc(100% - 13.5rem);max-width:52rem;flex:none}#content-side-layout{width:15rem;max-width:15rem;flex-basis:15rem}#content-side-layout>div{width:15rem;padding-left:1rem}#content-side-layout>div>div{width:14rem}}@media (min-width:1700px){#content-container>div{justify-content:center}}#content-container,body{background-color:var(--ns-paper)}#content-container{border-color:var(--ns-hairline)}#navbar>div:first-child{background-color:rgb(248 249 251/.72);backdrop-filter:blur(16px)}#page-title{color:var(--ns-ink);font-weight:500;letter-spacing:-.035em}#content :is(h2, h3, h4){color:var(--ns-ink);font-weight:500;letter-spacing:-.02em}#content,#content :is(p, li, td, blockquote){color:var(--ns-body)}#content :is(strong, th){color:var(--ns-ink)}.eyebrow{display:flex;align-items:center;gap:.5rem;color:var(--ns-quiet)!important;font-size:.75rem;font-weight:500;letter-spacing:.06em;text-transform:uppercase}.eyebrow::before{content:\"\";flex:none;width:6px;height:6px;background:var(--ns-blue)}#content :is(a.link, .callout a){color:var(--ns-blue);text-decoration-color:color-mix(in srgb,var(--ns-blue) 30%,transparent);border-bottom-color:color-mix(in srgb,var(--ns-blue) 30%,transparent)}#content :is(a.link, .callout a):hover{text-decoration-color:var(--ns-blue);border-bottom-color:var(--ns-blue)}.card,.card:hover{border-color:transparent!important}.card{background-color:var(--ns-well)!important;transition:background-color 150ms ease-out}.card:hover{background-color:var(--ns-well-hover)!important}.card :is(h2, [data-component-part=\"card-title\"]){color:var(--ns-ink);font-weight:500;letter-spacing:-.01em}.card:hover :is(h2, [data-component-part=\"card-title\"]){color:var(--ns-blue)}:is(.pagination-prev, .pagination-next){background-color:var(--ns-well);border-color:transparent;transition:background-color 150ms ease-out}:is(.pagination-prev, .pagination-next):hover{background-color:var(--ns-well-hover)}.code-block{background-color:var(--ns-well)!important;border-color:transparent!important}#content :not(pre)>code{background-color:var(--ns-well);color:var(--ns-ink)}.callout,.frame,.tab-container,[data-table-wrapper] table{border-color:var(--ns-hairline)}#navbar .navbar-link{border-color:var(--ns-hairline-strong);border-radius:var(--namespace-radius-control);background-color:transparent}#navbar .navbar-link a,.ns-product-toggle a:hover,.ns-product-toggle a[aria-current=page]{color:var(--ns-ink)}#navbar :is(a, button)[class*=bg-primary]{border-radius:var(--namespace-radius-control)}#navbar :is(a, button)[class*=bg-primary]:hover{background-color:var(--ns-blue-hover)}#search-bar-entry{background-color:var(--ns-raised);--tw-ring-color:var(--ns-hairline)}#table-of-contents a{color:var(--ns-quiet)}#table-of-contents a[data-active=true]{color:var(--ns-blue)}:is(a, button, [role=\"link\"], [tabindex]):focus-visible{outline:2px solid var(--ns-blue);outline-offset:2px}.ns-product-toggle+[data-component-part=products-selector-trigger]{display:none!important}.ns-product-toggle{position:relative;display:grid;grid-template-columns:1fr 1fr;flex:none;padding:3px;background-color:var(--ns-well);border-radius:var(--namespace-radius-container)}.ns-product-toggle::before{content:\"\";position:absolute;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);border-radius:3px;background-color:var(--ns-raised);box-shadow:inset 0 0 0 1px rgb(23 28 43/.08);transition:transform 200ms cubic-bezier(.16,1,.3,1)}.ns-product-toggle[data-active=Platform]::before{transform:translateX(100%)}.ns-product-toggle:not([data-active])::before{opacity:0}@media (prefers-reduced-motion:reduce){.ns-product-toggle::before{transition:none}}.ns-product-toggle a{display:flex;align-items:center;justify-content:center;padding:.3125rem .875rem;position:relative;border-radius:3px;color:var(--ns-quiet);font-size:.8125rem;font-weight:500;line-height:1.25rem;white-space:nowrap;transition:color 200ms ease-out}.ns-product-toggle--sidebar{margin-bottom:.5rem}.ns-product-toggle--sidebar~#navigation-items{top:5.5rem!important}#navbar .ns-product-toggle--inline{display:none}@media (max-width:1023px){.ns-product-toggle--sidebar{display:none}}html[data-ns-product-switching] [role=menu]:has([data-component-part=products-selector-item]){opacity:0!important;pointer-events:none!important}"},{"filePath":"reference/github-actions/runner-configuration.css","content":""},{"filePath":"workspaces/access.css","content":""},{"filePath":"platform/workspaces/access.css","content":""},{"filePath":"reference/devbox-cli/desktop.css","content":""}],"page":{"pagePath":"solutions/github-actions/docker-builds","slug":"/solutions/github-actions/docker-builds","pageMetadata":{"title":"Optimizing Docker build performance","sidebarTitle":"Docker Builds","description":null,"href":"/solutions/github-actions/docker-builds"},"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={a:`a`,code:`code`,em:`em`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Step,Steps}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Building Docker images can be one of the most time-consuming parts of your CI/CD pipeline.\nNamespace runners accelerate your Docker builds through build distribution, layer caching, and integration with your existing workflows.`}),`\n`,_jsx(`a`,{id:`quick-start-instant-performance-gains`}),`\n`,_jsx(Heading,{level:`2`,id:`quick-start`,children:`Quick start`}),`\n`,_jsx(_components.p,{children:_jsx(_components.em,{children:`No configuration changes required`})}),`\n`,_jsx(_components.p,{children:`The fastest way to speed up your Docker builds is to simply switch to Namespace runners.\nRemote Builders are enabled by default and will immediately accelerate your builds.`}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[3,6]`,numberOfLines:`12`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`12`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` build`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` runs-on`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`namespace-profile-default`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # was: ubuntu-latest`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` steps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`actions/checkout@v4`})]}),`\n`,_jsx(_components.span,{className:`line line-highlight`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # No docker/setup-buildx-action or docker/setup-qemu-action required!`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Build and push`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` push`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`my-registry/my-app:latest`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Note`}),`: If your workflow uses `,_jsx(_components.code,{children:`docker/setup-buildx-action`}),`, you need to `,_jsx(_components.a,{href:`/solutions/github-actions/docker-builds#skip-setup-buildx`,children:`remove or replace`}),` it.`]}),`\n`,_jsx(_components.p,{children:`That’s it! Your builds are now running on high-performance Remote Builders with advanced caching.`}),`\n`,_jsx(`a`,{id:`understanding-remote-builders-your-build-acceleration-engine`}),`\n`,_jsx(Heading,{level:`2`,id:`remote-builders`,children:`Remote Builders`}),`\n`,_jsx(Heading,{level:`3`,id:`how-remote-builders-transform-your-workflow`,children:`How Remote Builders transform your workflow`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.a,{href:`/solutions/docker-builders`,children:`Remote Builders`}),` fundamentally change how Docker builds work in your CI/CD pipeline:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Scale independently`}),`: Massive parallel compute power regardless of your runner size`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Cost optimization`}),`: Use smaller, cheaper runners while getting maximum build performance`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Zero configuration`}),`: Every Docker command automatically benefits from remote acceleration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Universal compatibility`}),`: Works with `,_jsx(_components.code,{children:`docker build`}),`, `,_jsx(_components.code,{children:`docker/build-push-action`}),`, and any Docker-based tooling`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`monitoring-your-accelerated-builds`,children:`Monitoring your accelerated builds`}),`\n`,_jsx(_components.p,{children:`Every build launched from your runners appears in the interface providing direct access to detailed logs, timing metrics, and performance analytics.`}),`\n`,_jsxs(`div`,{className:`mint-flex mint-flex-wrap mint-items-center mint-justify-center mint-gap-8 mint-my-8`,children:[_jsx(Frame,{className:`mint-m-0`,style:{maxWidth:290,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=59a3bf85858a83a6643e689b3fda0311`,alt:`Container Builds`,width:736,height:450,\"data-og-width\":`736`,\"data-og-height\":`450`,\"data-path\":`images/github-actions/container-builds.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=897529fc65d82b086c8d29f92bedd628 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=be521ef46c70ca7bd3515e3d554c222f 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=ee46252482ce15cf2c585e9a94753a08 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=9211af73efd4a5038d6550b249fc148e 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=628d8eb135a3828f32a73da1364acfc9 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/container-builds.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=9880ce3786a361d6a549ec19466093f0 2500w`})}),_jsx(Frame,{className:`mint-m-0`,style:{maxWidth:400,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=3642b39a5369be57fca36ad9039332c4`,alt:`Build Tracing`,width:1144,height:502,\"data-og-width\":`1144`,\"data-og-height\":`502`,\"data-path\":`images/github-actions/buildtrace.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=954be0e9457d06e33a7c0034d132cdbe 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=937121187c09e9b3b6fa13ea4079b9b6 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=358544c08c39dc98f2df5b494b3f2202 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=428a7f081a7ba8614d2122705b9f0a8f 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=a3ec52b6f44bf7014de1f3ad7bf94519 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/buildtrace.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=3e19f905a23c32a445ef284c71e33a1d 2500w`})})]}),`\n`,_jsx(_components.p,{children:`This visibility helps you understand exactly how much time Remote Builders are saving.\nWhen looking at a slow build step, you can directly jump into the logs to understand which work was performed.`}),`\n`,_jsx(Frame,{style:{maxWidth:600,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=5631e26a75f08d940471f98cab90cffb`,alt:`build layer performance tracing`,width:1600,height:733,\"data-og-width\":`1600`,\"data-og-height\":`733`,\"data-path\":`images/docker-builders/tracing.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=144f3afe8cb1e694a55ed4c515fd2104 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=e4774af96f4254117e92fce55147b08b 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=265f2b56518b0c0b14f96255ac358017 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=06bcba8e735ca6b3fff6f513d69db0e9 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=7a3ad7e60786746547c5244e08abdb59 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/docker-builders/tracing.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=dc637a00bf85ac498d9476124e883109 2500w`})}),`\n`,_jsxs(_components.p,{children:[`Head to `,_jsx(_components.a,{href:`/solutions/docker-builders/tracing-and-logs`,children:`Build Observability →`}),` to learn how to monitor build performance and identify bottlenecks.`]}),`\n`,_jsx(`a`,{id:`seamless-private-registry-integration`}),`\n`,_jsx(Heading,{level:`2`,id:`private-registry-nscr-io`,children:`Private registry (nscr.io)`}),`\n`,_jsxs(_components.p,{children:[`Your builds get instant access to your private container registry at `,_jsx(_components.a,{href:`/architecture/storage/container-registry`,children:`nscr.io`}),` with zero setup required.\nAuthentication is handled automatically.`]}),`\n`,_jsxs(Steps,{titleSize:`h3`,children:[_jsx(Step,{title:`Push to your private registry`,id:`push-to-your-private-registry`,children:_jsx(CodeBlock,{filename:``,highlight:`[6]`,numberOfLines:`6`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Build and push to private registry`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` push`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` tags`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"${{ env.NSC_CONTAINER_REGISTRY }}/my-app:${{ github.sha }}\"})]}),`\n`]})})})}),_jsx(Step,{title:`Pull from your private registry`,id:`pull-from-your-private-registry`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Use base image from private registry`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"docker pull ${{ env.NSC_CONTAINER_REGISTRY }}/my-app:${{ github.sha }}\"})]}),`\n`]})})})})]}),`\n`,_jsxs(_components.p,{children:[`You can find a tag overview with history and usage statistics for pushed images in the `,_jsx(_components.a,{href:`https://cloud.namespace.so/workspace/registry`,children:`dashboard`}),`.`]}),`\n`,_jsx(Frame,{style:{maxWidth:600,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=612f6ac15618efbf2d67d2589c91cbad`,alt:`container image registry`,width:1600,height:789,\"data-og-width\":`1600`,\"data-og-height\":`789`,\"data-path\":`images/github-actions/registry.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=800580a7076e459deb38acd91b6460d3 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=3a842ac0dc7f12d57d90c4fad3cd4b08 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=fdfc432d1a039a5679140d404e92169c 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=6e699f92391d7a7ea77d0ebd1c66975d 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=dcd3fb709459ba2dbd766ce0f58fb57f 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/registry.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=7b7179969b940d087f64338d0cbac5e2 2500w`})}),`\n`,_jsx(`a`,{id:`when-to-choose-local-caching`}),`\n`,_jsx(Heading,{level:`2`,id:`local-caching`,children:`Local caching`}),`\n`,_jsx(_components.p,{children:`While Remote Builders provide the best performance for most scenarios, in-runner builders (locally cached) excel when building massive images (10GB+).\nKeeping the build local skips network transfer time.`}),`\n`,_jsxs(_components.p,{children:[`This section covers when to keep a build local. For caching container image pulls themselves, see `,_jsx(_components.a,{href:`/solutions/github-actions/caching/container-images`,children:`Container Images`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`To enable this feature, just open the `,_jsx(_components.a,{href:`https://cloud.namespace.so/workspace/actions/profiles`,children:`runner profile`}),` configuration and add a cache volume. Next, select `,_jsx(_components.code,{children:`Locally cached`}),` for your Docker builds.\nMake sure to size your cache appropriately to benefit from a high cache hit ratio.`]}),`\n`,_jsx(Frame,{style:{maxWidth:500,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=ae8e695cffcd7c79fe97488da9223103`,alt:`locally cached Docker build configuration`,width:1090,height:164,\"data-og-width\":`1090`,\"data-og-height\":`164`,\"data-path\":`images/github-actions/in-runner-builder.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=85c0c603bc978c4f50d7dc1699e44985 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=9ab8f0ca008e700c452986bf43188328 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=3324280e8c6504c6ac237bba901fa561 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=99fb487590052eee846354c412e3a51f 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=f9872c8fb68b4cfc2fdfe9fec0ead6ed 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/in-runner-builder.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=c868f8c1ceef2d43b2257c53d2e742f4 2500w`})}),`\n`,_jsx(Heading,{level:`4`,id:`caveats`,children:`Caveats`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Build caching using “local caching” is not shared with Remote Builders; each\nrepository uses its own separate cache.`}),`\n`,_jsx(_components.li,{children:`Although multi-platform builds are supported, only builds of the same platform\nas the runner itself, will experience native performance.`}),`\n`]}),`\n`,_jsx(Heading,{level:`4`,id:`billing`,children:`Billing`}),`\n`,_jsx(_components.p,{children:`Using local caching does not lead to any additional compute usage beyond\nthe runner’s execution time itself. In order to make use of the feature,\nincluding logging and tracing, each build made with local caching\ncounts towards the total build usage.`}),`\n`,_jsx(Heading,{level:`2`,id:`optimize-cache-mounts`,children:`Optimize cache mounts`}),`\n`,_jsxs(_components.p,{children:[`A common strategy to improve your build performance is the adoption of `,_jsx(_components.a,{href:`https://docs.docker.com/build/cache/optimize/#use-cache-mounts`,children:`build cache mounts`}),`, allowing you to persist cache data across container builds and reduce build times significantly.`]}),`\n`,_jsx(_components.p,{children:`With Namespace, your builds run in a shared, remote, high-performance builder by default, unlike on GitHub runners, where your docker builds run inside the runner.\nThis sharing means that you’ll see more cache hits across different builds, and hence faster builds.`}),`\n`,_jsxs(_components.p,{children:[`Cache mounts allow multi-writer access by default.\nSome tools (e.g. apt) need exclusive access to its data.\nTo achieve this, you can select `,_jsx(_components.code,{children:`sharing=locked`}),` which makes concurrent builds wait for another.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`shellscript`,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:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`RUN`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --mount=type=cache,target=/var/cache/apt,sharing=locked`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --mount=type=cache,target=/var/lib/apt,sharing=locked`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` apt`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` \u0026\u0026 `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`apt-get`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --no-install-recommends`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -y`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` gcc`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`builds-without-output`,children:`Builds without output`}),`\n`,_jsxs(_components.p,{children:[`When you want to test a build without pushing or loading it, use the `,_jsx(_components.code,{children:`cacheonly`}),` output type.\nThis runs the full build and populates the cache, but skips the export step:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v6`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` outputs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`type=cacheonly`})]}),`\n`]})})}),`\n`,_jsx(`a`,{id:`enterprise-build-scaling`}),`\n`,_jsx(Heading,{level:`2`,id:`enterprise-scaling`,children:`Enterprise scaling`}),`\n`,_jsx(_components.p,{children:`Need to run hundreds of concurrent builds? Namespace supports full-fanout builds that can handle enterprise-scale build volumes without performance degradation.`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Automatic scaling`}),`: Remote Builders support automatic scale-out to match your build volume`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`No queue bottlenecks`}),`: Parallel processing ensures builds start immediately`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Dedicated compute`}),`: With dedicated Namespace compute, you get a fully consistent build performance experience`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Contact `,_jsx(_components.a,{href:`mailto:support@namespace.so`,children:`support@namespace.so`}),` to discuss custom scaling configurations for your build volume requirements.`]}),`\n`,_jsx(Heading,{level:`2`,id:`disable-build-caching`,children:`Disable build caching`}),`\n`,_jsx(_components.p,{children:`If you prefer to skip build caching altogether, you have two options:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Revert the Docker build context to the default`}),`: Namespace configures Remote Builders\nas a separate `,_jsx(_components.code,{children:`buildx`}),` `,_jsx(_components.a,{href:`https://docs.docker.com/engine/reference/commandline/context/`,children:`context`}),`. Before invoking a build that should not be cached, you can switch back to the\ndefault by calling `,_jsx(_components.code,{children:`docker buildx use default`}),`. E.g.`]}),`\n`,_jsx(CodeBlock,{filename:``,highlight:`[4,5]`,numberOfLines:`11`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`11`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`jobs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` build`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` steps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Use default builder`})]}),`\n`,_jsxs(_components.span,{className:`line line-highlight`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker buildx use default`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Build and push`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` platforms`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`linux/amd64,linux/arm64`})]}),`\n`]})})}),`\n`]}),`\n`,_jsxs(_components.li,{children:[`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Disable Remote Builders`}),`: You can request that runners created for a\nparticular workflow job do not use Remote Builders.`]}),`\n`,_jsxs(_components.p,{children:[`To disable Remote Builders, just open the `,_jsx(_components.a,{href:`https://cloud.namespace.so/workspace/actions/profiles`,children:`runner profile`}),` configuration and select `,_jsx(_components.code,{children:`No caching`}),` for your Docker builds.`]}),`\n`,_jsx(Frame,{style:{maxWidth:500,marginInline:`auto`},children:_jsx(OptimizedImage,{src:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=7074900a90cb9c4cb9429d08a177cd21`,alt:`local Docker builder configuration`,width:1094,height:162,\"data-og-width\":`1094`,\"data-og-height\":`162`,\"data-path\":`images/github-actions/no-remote-builder.webp`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=280\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=3aa23840f0691709fdd009e001110682 280w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=560\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=0c12e3b568ea98efadb0876f6462c271 560w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=840\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=d1de64b43ba82eea84f0fb872fa6f86f 840w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=1100\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=337ed0dd1ac3546d524161b0b4e3adaf 1100w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=1650\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=db6745e0369bd4804047698a95bc94fc 1650w, https://mintcdn.com/namespace-labs/QVtD1jw4ML2vd3TZ/images/github-actions/no-remote-builder.webp?w=2500\u0026fit=max\u0026auto=format\u0026n=QVtD1jw4ML2vd3TZ\u0026q=85\u0026s=69b1165098ebec0eb12a6028afb012c8 2500w`})}),`\n`]}),`\n`]}),`\n`,_jsx(`a`,{id:`migrating-from-github-actions`}),`\n`,_jsx(Heading,{level:`2`,id:`skip-setup-buildx`,children:`Migrating from GitHub Actions`}),`\n`,_jsx(_components.p,{children:_jsxs(_components.strong,{children:[`Remove `,_jsx(_components.code,{children:`setup-buildx-action`})]})}),`\n`,_jsxs(_components.p,{children:[`Because Namespace runners are configured out of the box to use Remote Builders, there is no need to set up or configure buildx separately.\nIn fact, running `,_jsx(_components.code,{children:`docker/setup-buildx-action`}),` will overwrite the default configuration and prevent you from using Remote Builders.`]}),`\n`,_jsxs(_components.p,{children:[`You can just remove `,_jsx(_components.code,{children:`docker/setup-buildx-action`}),` from your workflow entirely, or replace it with `,_jsx(_components.code,{children:`namespacelabs/nscloud-setup-buildx-action`}),`:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus has-diff`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`name`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Set up Docker Buildx`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/setup-buildx-action@v3`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-add`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`namespacelabs/nscloud-setup-buildx-action@v0`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`qemu-is-not-required`,children:`QEMU is not required`}),`\n`,_jsx(_components.p,{children:`Multi-platform builds using Remote Builders don’t use emulation for AMD64 and ARM64 builds, instead building on these platforms natively.\nThis results in much better performance for multi-platform builds, and also means there is no need to set up QEMU.`}),`\n`,_jsxs(_components.p,{children:[`When using Remote Builders, you can safely remove `,_jsx(_components.code,{children:`docker/setup-qemu-action`}),`, too:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus has-diff`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`steps`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/setup-qemu-action@v3`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/setup-buildx-action@v3`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` - `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`skip-github-actions-caching`,children:`Skip GitHub Actions caching`}),`\n`,_jsxs(_components.p,{children:[`Traditional CI/CD requires complex caching strategies, but Namespace’s build infrastructure makes this unnecessary.\nNamespace build solutions include maximum layer caching out of the box.\nUsing traditional GitHub Actions caching like `,_jsx(_components.code,{children:`cache-from`}),`/`,_jsx(_components.code,{children:`cache-to`}),` is superfluous when using Namespace builders and typically adds delays through remote file operations.`]}),`\n`,_jsx(_components.p,{children:`You can remove them from your workflow definition:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`yaml`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus has-diff`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`uses`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`docker/build-push-action@v5`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` context`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`.`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` cache-from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`type=registry,ref=user/app:buildcache`})]}),`\n`,_jsxs(_components.span,{className:`line line-diff line-remove`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` cache-to`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`type=registry,ref=user/app:buildcache,mode=max`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`4`,id:`what-this-means-for-you`,children:`What this means for you`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`No cache configuration: remove complex caching logic from your workflows.`}),`\n`,_jsx(_components.li,{children:`Faster cold starts: even first builds benefit from shared layer caches.`}),`\n`,_jsx(_components.li,{children:`Consistent performance: cache hit rates are optimized automatically.`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/solutions/github-actions/caching/build-systems`,children:`Build System Integrations`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/solutions/github-actions/custom-base-images`,children:`Custom base images`})}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`For advanced configuration see `,_jsx(_components.a,{href:`/reference/github-actions/runner-configuration`,children:`Runner Labels`}),`.`]})]})}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":"Optimizing Docker build performance","sidebarTitle":"Docker Builds","description":null,"href":"/solutions/github-actions/docker-builds"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Quick start","slug":"quick-start","depth":2,"children":[]},{"title":"Remote Builders","slug":"remote-builders","depth":2,"children":[{"title":"How Remote Builders transform your workflow","slug":"how-remote-builders-transform-your-workflow","depth":3,"children":[]},{"title":"Monitoring your accelerated builds","slug":"monitoring-your-accelerated-builds","depth":3,"children":[]}]},{"title":"Private registry (nscr.io)","slug":"private-registry-nscr-io","depth":2,"children":[{"title":"Push to your private registry","slug":"push-to-your-private-registry","depth":3,"children":[]},{"title":"Pull from your private registry","slug":"pull-from-your-private-registry","depth":3,"children":[]}]},{"title":"Local caching","slug":"local-caching","depth":2,"children":[{"title":"Caveats","slug":"caveats","depth":4,"children":[]},{"title":"Billing","slug":"billing","depth":4,"children":[]}]},{"title":"Optimize cache mounts","slug":"optimize-cache-mounts","depth":2,"children":[]},{"title":"Builds without output","slug":"builds-without-output","depth":2,"children":[]},{"title":"Enterprise scaling","slug":"enterprise-scaling","depth":2,"children":[]},{"title":"Disable build caching","slug":"disable-build-caching","depth":2,"children":[]},{"title":"Migrating from GitHub Actions","slug":"skip-setup-buildx","depth":2,"children":[{"title":"QEMU is not required","slug":"qemu-is-not-required","depth":3,"children":[]},{"title":"Skip GitHub Actions caching","slug":"skip-github-actions-caching","depth":3,"children":[]},{"title":"What this means for you","slug":"what-this-means-for-you","depth":4,"children":[]}]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/namespace-labs/fa018fe02fd436c8/navigation.js","/docs/_mintlify/custom/namespace-labs/4276600b7cb636ff/legacy-anchor-redirects.js","/docs/_mintlify/custom/namespace-labs/5f0dff80d262d975/product-toggle.js"],"dynamicCss":".mint-m-0 {\n margin: 0px\n}\n.mint-my-8 {\n margin-top: 2rem;\n margin-bottom: 2rem\n}\n.mint-flex {\n display: flex\n}\n.mint-flex-wrap {\n flex-wrap: wrap\n}\n.mint-items-center {\n align-items: center\n}\n.mint-justify-center {\n justify-content: center\n}\n.mint-gap-8 {\n gap: 2rem\n}","subdomain":"namespace-labs","siteName":"Namespace Documentation","title":"Optimizing Docker build performance - Namespace Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-28T08:49:04.106Z","gitLastModified":"2026-09-22T09:40:17.000Z","originalFileLocation":"solutions/github-actions/docker-builds.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";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=\"light\"}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=\"application-name\" content=\"Namespace Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_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=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Optimizing Docker build performance - Namespace Documentation\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Namespace Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://namespace.so/docs/solutions/github-actions/docker-builds\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://namespace-labs.mintlify.app/_mintlify/api/og/v2?division=GitHub+Actions\u0026amp;title=Optimizing+Docker+build+performance\u0026amp;theme=68c752ad199726e1f15363c8\u0026amp;signature=ffc20e8c476f9350319a8a034c9cba1acfbf01f78d53e2f7c86d8853de18419c\">\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=\"Optimizing Docker build performance - Namespace Documentation\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://namespace-labs.mintlify.app/_mintlify/api/og/v2?division=GitHub+Actions\u0026amp;title=Optimizing+Docker+build+performance\u0026amp;theme=68c752ad199726e1f15363c8\u0026amp;signature=ffc20e8c476f9350319a8a034c9cba1acfbf01f78d53e2f7c86d8853de18419c\">\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=\"/docs/mintlify-assets/_mintlify/favicons/namespace-labs/kZKeJ4zhJEuE6_kI/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Namespace Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1C32FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://namespace.so/docs/solutions/github-actions/docker-builds\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/solutions/github-actions/docker-builds.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://namespace.so/#organization\",\"name\":\"Namespace Documentation\",\"url\":\"https://namespace.so\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/namespace-labs/qJGgMfy2GtyyZNVM/logo-light.svg?fit=max\u0026auto=format\u0026n=qJGgMfy2GtyyZNVM\u0026q=85\u0026s=fe139e3cd2f35a81098b6931347d8ed4\"}},{\"@type\":\"WebSite\",\"@id\":\"https://namespace.so/docs#website\",\"name\":\"Namespace Documentation\",\"url\":\"https://namespace.so/docs\",\"publisher\":{\"@id\":\"https://namespace.so/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://namespace.so/docs/solutions/github-actions/docker-builds#webpage\",\"url\":\"https://namespace.so/docs/solutions/github-actions/docker-builds\",\"name\":\"Optimizing Docker build performance\",\"dateModified\":\"2026-09-22T09:40:17.000Z\",\"isPartOf\":{\"@id\":\"https://namespace.so/docs#website\"},\"breadcrumb\":{\"@id\":\"https://namespace.so/docs/solutions/github-actions/docker-builds#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://namespace.so/docs/solutions/github-actions/docker-builds#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Products\",\"item\":\"https://namespace.so/docs/solutions/github-actions/index\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"GitHub Actions\",\"item\":\"https://namespace.so/docs/solutions/github-actions/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Optimizing Docker build performance\",\"item\":\"https://namespace.so/docs/solutions/github-actions/docker-builds\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://namespace.so/docs/solutions/github-actions/docker-builds#article\",\"headline\":\"Optimizing Docker build performance\",\"name\":\"Optimizing Docker build performance\",\"url\":\"https://namespace.so/docs/solutions/github-actions/docker-builds\",\"mainEntityOfPage\":{\"@id\":\"https://namespace.so/docs/solutions/github-actions/docker-builds#webpage\"},\"dateModified\":\"2026-09-22T09:40:17.000Z\",\"publisher\":{\"@id\":\"https://namespace.so/#organization\"},\"isPartOf\":{\"@id\":\"https://namespace.so/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Namespace Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Namespace Documentation","nav":{"global":{"anchors":[{"anchor":"Changelog","icon":"history","href":"https://namespace.so/changelog"},{"anchor":"Trust Center (SOC2)","icon":"shield-check","href":"https://trust.namespace.so/"},{"anchor":"Status","icon":"activity","href":"https://namespace-status.com/"},{"anchor":"Support","icon":"message-circle","href":"https://namespace.so/support"}]},"products":[{"product":"Products","description":"Turnkey products built on the Namespace platform","tabs":[{"tab":"Documentation","icon":"book-open","pages":[{"title":"Namespace Documentation","sidebarTitle":"Overview","href":""},{"group":"Products","pages":[{"group":"GitHub Actions","icon":"github","pages":[{"title":"Accelerate your GitHub Actions with Namespace","sidebarTitle":"Getting Started","href":"/solutions/github-actions/index"},{"group":"Cache Volumes","pages":[{"title":"Caching in GitHub Actions","sidebarTitle":"Overview","href":"/solutions/github-actions/caching/index"},{"title":"Container Images","href":"/solutions/github-actions/caching/container-images"},{"title":"Git Checkouts","href":"/solutions/github-actions/caching/git-checkouts"},{"title":"Toolchains","sidebarTitle":"Toolchains","href":"/solutions/github-actions/caching/toolchains"},{"title":"Actions","sidebarTitle":"Actions","href":"/solutions/github-actions/caching/actions"},{"title":"Build System Integrations","sidebarTitle":"Build Systems","href":"/solutions/github-actions/caching/build-systems"},{"title":"Troubleshooting cache volumes","sidebarTitle":"Troubleshooting","href":"/solutions/github-actions/caching/troubleshooting"}]},{"title":"Fast repository checkouts with Git snapshots","sidebarTitle":"Git Snapshots","description":null,"href":"/solutions/github-actions/git-snapshots"},{"title":"Optimizing Docker build performance","sidebarTitle":"Docker Builds","href":"/solutions/github-actions/docker-builds"},{"title":"Custom base images for GitHub Actions","sidebarTitle":"Custom Base Images","description":null,"href":"/solutions/github-actions/custom-base-images/index"},{"group":"Debugging","pages":[{"title":"Debugging GitHub Actions","sidebarTitle":"Overview","href":"/solutions/github-actions/debugging/index"},{"title":"Interactive Access","href":"/solutions/github-actions/debugging/interactive-access"},{"title":"Remote Display","href":"/solutions/github-actions/debugging/remote-display"},{"title":"Performance Metrics","href":"/solutions/github-actions/debugging/performance-metrics"},{"title":"Advanced Logging","href":"/solutions/github-actions/debugging/logging"},{"title":"Out of memory (OOM) detection","sidebarTitle":"OOM Detection","href":"/solutions/github-actions/debugging/oom-detection"},{"title":"Crash Dumps","href":"/solutions/github-actions/debugging/crash-dumps"},{"title":"Queue Time","href":"/solutions/github-actions/debugging/queue-time"}]},{"group":"Runner Controls","pages":[{"title":"Runner Controls","sidebarTitle":"Overview","href":"/solutions/github-actions/runner-controls"},{"title":"Concurrent runners","href":"/solutions/github-actions/runner-controls/concurrent-runners"},{"title":"Job Ordering \u0026 Priority","sidebarTitle":"Job Ordering","href":"/solutions/github-actions/runner-controls/job-ordering"},{"title":"Privileged Workflows","sidebarTitle":"Privileged Workflows","href":"/solutions/github-actions/runner-controls/privileged-workflows"},{"title":"Landlock","sidebarTitle":"Landlock","href":"/solutions/github-actions/runner-controls/landlock"},{"title":"Swap Space","sidebarTitle":"Swap Space","href":"/solutions/github-actions/runner-controls/swap"},{"title":"Tailscale","sidebarTitle":"Tailscale","href":"/solutions/github-actions/runner-controls/tailscale"},{"title":"Access Levels","sidebarTitle":"Access Levels","href":"/solutions/github-actions/runner-controls/access-levels"},{"title":"Running jobs in containers","sidebarTitle":"Containerized Jobs","href":"/solutions/github-actions/runner-controls/containerized-jobs"}]},{"title":"Optimizing Usage","href":"/solutions/github-actions/optimizing-usage"},{"title":"Runner Labels","sidebarTitle":"Runner Labels","href":"/reference/github-actions/runner-configuration"},{"group":"Actions","expanded":false,"pages":[{"title":"nscloud-setup","href":"/reference/github-actions/nscloud-setup"},{"title":"nscloud-setup-buildx-action","href":"/reference/github-actions/nscloud-setup-buildx-action"},{"title":"nscloud-cluster-action","href":"/reference/github-actions/nscloud-cluster-action"},{"title":"nscloud-cache-action","href":"/reference/github-actions/nscloud-cache-action"},{"title":"nscloud-checkout-action","href":"/reference/github-actions/nscloud-checkout-action"},{"title":"nscloud-expose-kubernetes-action","href":"/reference/github-actions/nscloud-expose-kubernetes-action"},{"title":"breakpoint-action","href":"/reference/github-actions/breakpoint"},{"title":"upload-artifact","href":"/reference/github-actions/upload-artifact"},{"title":"download-artifact","href":"/reference/github-actions/download-artifact"},{"title":"setup-turbocache","href":"/reference/github-actions/setup-turbocache"}]}]},{"group":"Devboxes","icon":"container","pages":[{"title":"High-Performance Developer Environments with Devboxes","sidebarTitle":"Getting Started","href":"/devbox/index"},{"group":"Managing Devboxes","expanded":false,"pages":[{"title":"Devbox Lifecycle","sidebarTitle":"Lifecycle","href":"/devbox/lifecycle"},{"title":"Devbox Blueprints","sidebarTitle":"Blueprints","href":"/devbox/blueprint"},{"title":"Devbox Services","sidebarTitle":"Services","href":"/devbox/services"},{"title":"Shareable URLs","href":"/devbox/url"},{"title":"Custom Images","href":"/devbox/images"}]},{"group":"Working in a Devbox","expanded":false,"pages":[{"title":"Connecting to a Devbox","sidebarTitle":"SSH \u0026 Sessions","href":"/devbox/connecting"},{"title":"Executing Commands","href":"/devbox/exec"},{"title":"Running long tasks","sidebarTitle":"Long Running Tasks","href":"/guides/devbox/long-running-tasks"},{"title":"Computer Controls","sidebarTitle":"Computer Use","href":"/devbox/computer-use"},{"title":"Remote Desktop","sidebarTitle":"Remote Desktop","href":"/devbox/remote-desktop"},{"title":"Open IDE","href":"/devbox/ides"}]},{"group":"Managed Agents","tag":"Integrations","expanded":false,"pages":[{"title":"Amp Orbs","sidebarTitle":"Amp Orbs","href":"/integrations/amp"},{"title":"Claude Managed Agents","sidebarTitle":"Claude Managed Agents","href":"/integrations/claude"},{"title":"Cursor Cloud Agents","sidebarTitle":"Cursor Cloud Agents","href":"/integrations/cursor"},{"title":"Devin on Devboxes","sidebarTitle":"Devin","href":"/integrations/devin"}]}]},{"group":"Bazel","icon":"hammer","pages":[{"title":"Speed up your Bazel builds with Namespace","sidebarTitle":"Introduction","href":"/bazel/index"},{"title":"Bazel cache","sidebarTitle":"Caching","href":"/bazel/cache"},{"title":"Bazel Remote Execution","sidebarTitle":"Remote Build Execution","href":"/bazel/execution"},{"title":"Bazel observability","sidebarTitle":"Observability","href":"/bazel/observability"}]},{"group":"Docker Builders","icon":"container","pages":[{"title":"Speed up your Docker Builds with Namespace","sidebarTitle":"Getting Started","href":"/solutions/docker-builders/index"},{"title":"Container Registry","href":"/solutions/docker-builders/registry"},{"title":"Docker Build Observability","sidebarTitle":"Tracing \u0026 Logs","href":"/solutions/docker-builders/tracing-and-logs"}]},{"group":"Buildkite Agents","icon":"workflow","pages":[{"title":"Run Buildkite Jobs on Namespace","sidebarTitle":"Getting Started","href":"/solutions/buildkite-agents/index"},{"title":"Managing Buildkite Queues","sidebarTitle":"Managing Queues","href":"/solutions/buildkite-agents/managing-queues"},{"title":"Configure Buildkite Agents","sidebarTitle":"Configuration","href":"/solutions/buildkite-agents/configuration"},{"title":"Fast repository checkouts with Git snapshots","sidebarTitle":"Git Snapshots","href":"/solutions/buildkite-agents/git-snapshots"}]}]},{"group":"Platform","pages":[{"group":"Compute","icon":"cpu","pages":[{"title":"Compute Platform","sidebarTitle":"Overview","href":"/architecture/compute/index"},{"title":"Linux","href":"/architecture/compute/linux"},{"title":"macOS","href":"/architecture/compute/macos"},{"title":"Windows","href":"/architecture/compute/windows"},{"title":"Observability","href":"/architecture/compute/observability"},{"title":"SSH / Remote Display with Namespace Compute","sidebarTitle":"SSH / Remote Display","href":"/architecture/compute/ssh-remote-display"},{"title":"Machine Shapes","href":"/architecture/compute/machine-shapes"},{"title":"Resource Limits","href":"/architecture/compute/resource-limits"}]},{"group":"Storage","icon":"database","pages":[{"title":"Storage","sidebarTitle":"Overview","href":"/architecture/storage/index"},{"title":"Cache Volumes","href":"/architecture/storage/cache-volumes"},{"title":"Container Registry","href":"/architecture/storage/container-registry"},{"title":"Artifact Storage","href":"/architecture/storage/artifact-storage"},{"title":"Secrets","href":"/architecture/storage/secrets"}]},{"group":"Networking","icon":"network","pages":[{"title":"Networking","sidebarTitle":"Overview","href":"/architecture/networking/index"},{"title":"Ingress","href":"/architecture/networking/ingress"},{"title":"Network Performance Optimizations","sidebarTitle":"Performance","href":"/architecture/networking/performance"},{"title":"Network Security","sidebarTitle":"Security","href":"/architecture/networking/security"},{"title":"Egress policies","href":"/security/egress-policy"}]}]},{"group":"Administration","pages":[{"group":"Workspaces","icon":"briefcase-business","pages":[{"title":"Workspaces","sidebarTitle":"Overview","href":"/workspaces/index"},{"title":"Workspace Access Controls","sidebarTitle":"Access","href":"/workspaces/access"},{"title":"Billing \u0026 Included Amounts","sidebarTitle":"Billing and limits","href":"/workspaces/billing-and-limits"},{"title":"Data Residency for Workspaces","sidebarTitle":"Data residency","href":"/workspaces/data-residency"},{"title":"Security \u0026 Compliance","sidebarTitle":"Security","href":"/workspaces/security"},{"title":"Audit Logs","sidebarTitle":"Audit logging","href":"/security/auditlog"},{"title":"Permissions","href":"/security/permissions"}]},{"group":"Federation","icon":"shield-check","pages":[{"title":"Workload Federation","sidebarTitle":"Overview","href":"/federation/index"},{"title":"Workload Federation with AWS","sidebarTitle":"AWS","href":"/federation/aws"},{"title":"Workload Federation with GCP","sidebarTitle":"GCP","href":"/federation/gcp"},{"title":"Workload Federation with OpenID Connect","sidebarTitle":"OpenID","href":"/federation/openid"},{"title":"Identity Federation with GitHub Actions","sidebarTitle":"Github Actions","href":"/federation/github-actions"},{"title":"Identity Federation with CircleCI","sidebarTitle":"CircleCI","href":"/federation/circleci"},{"title":"Identity Federation with RWX","sidebarTitle":"RWX","href":"/federation/rwx"}]},{"group":"Dashboard","icon":"layout-dashboard","pages":[{"title":"GitHub Actions Overview","sidebarTitle":"GitHub Actions","href":"/dashboard/github-actions"},{"title":"Builds UI","sidebarTitle":"Builds","href":"/dashboard/builds"},{"title":"Registry UI","sidebarTitle":"Registry","href":"/dashboard/registry"},{"title":"Usage Explorer","href":"/dashboard/usage-explorer"}]}]}]},{"tab":"Integrations","icon":"blocks","pages":[{"title":"Integrations","href":"/integrations/turborepo"}]},{"tab":"CLI","icon":"square-terminal","pages":[{"title":"CLI","href":"/reference/cli"}]},{"tab":"SDK","icon":"braces","pages":[{"title":"SDK","href":"/reference/sdk"}]},{"tab":"MCP","icon":"plug","pages":[{"title":"MCP","href":"/reference/mcp"}]}]},{"product":"Platform","description":"Lower-level primitives to build your own","pages":[{"title":"Platform","href":"/platform"}]}]},"title":"Optimizing Docker build performance - Namespace Documentation","buildId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","deploymentId":"dpl_3rfzHPCtRhDFBbetXZ3oLkN5tjmA","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-Dit-D9cD.js","DynamicMarkdown-B3juXLG8.js","zoom-image-lightbox-D2y4WbiL.js","lightbox-handle-r17bVUz3.js"]}