원클릭으로
docker-multi-platform
Multi-architecture builds, buildx builder configuration, manifest lists, platform targeting, and cross-compilation patterns.
메뉴
Multi-architecture builds, buildx builder configuration, manifest lists, platform targeting, and cross-compilation patterns.
Debug running containers with log analysis, shell access, state inspection, and network diagnostics.
Multi-stage pipelines, sidecar patterns, healthchecks, init containers, signal handling, and graceful shutdown.
Use Docker in CI/CD pipelines with GitHub Actions, multi-platform builds, registry push, and layer caching strategies.
Write, debug, and optimize docker-compose.yml files with service definitions, networking, volumes, and healthchecks.
Manage Docker contexts for multi-host and remote Docker engine workflows
Set up development environments with Docker including hot reload, dev containers, bind mounts, and database containers.
| name | docker-multi-platform |
| description | Multi-architecture builds, buildx builder configuration, manifest lists, platform targeting, and cross-compilation patterns. |
| standards-version | 1.10.0 |
Use this skill when:
TARGETPLATFORM / TARGETARCH ARGsdocker buildx build --platform with appropriate cache and output optionsdocker buildx imagetools to combine imagesdocker buildx build --platform linux/amd64,linux/arm64 - the core multi-platform build commanddocker buildx create --driver docker-container - create a builder capable of multi-platformdocker buildx ls - verify available builders and their platform supportdocker manifest create / annotate / push - manual manifest list managementTARGETPLATFORM, TARGETARCH, TARGETOS, TARGETVARIANT - automatic ARGs available in Dockerfiles during cross-buildsUser: I need my Go API image to run on both amd64 and arm64. How do I set that up?
Assistant: Here's the approach:
docker buildx create --name multiarch --driver docker-container --use
FROM --platform=$BUILDPLATFORM golang:1.22-alpine AS builder
ARG TARGETARCH
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 GOARCH=$TARGETARCH go build -o /api .
FROM alpine:3.20
COPY --from=builder /api /api
ENTRYPOINT ["/api"]
docker buildx build --platform linux/amd64,linux/arm64 \
--tag myregistry/api:latest --push .
docker manifest inspect myregistry/api:latest
This skill leverages the following MCP tools:
docker_buildxBuild - run multi-platform builds with cache and provenance optionsdocker_buildxLs - list builders and check platform supportdocker_buildxCreate - create a builder with the right driver for multi-platformdocker_buildxRm - clean up builders no longer neededdocker_buildxInspect - check builder status and supported platformsdocker_buildxUse - switch between buildersdocker_buildxImagetools - inspect and create manifest lists via buildxdocker_builderPrune - clean build cachedocker_manifestCreate - create manifest lists manuallydocker_manifestInspect - verify manifest list contents and platformsdocker_manifestAnnotate - set platform metadata on manifest entriesdocker_manifestPush - push manifest lists to registriesdocker_manifestRm - remove local manifest listsdocker_build - single-platform builds (for comparison or fallback)docker build instead of docker buildx build - the regular docker build cannot produce multi-platform images. You need buildx with a docker-container or remote driver.docker driver only builds for the host architecture. Create a builder with --driver docker-container.wget URLs with amd64 in the path, or architecture-specific binaries, break on other platforms. Use TARGETARCH ARG.docker run --privileged --rm tonistiigi/binfmt --install all first.--push vs --load - multi-platform builds cannot use --load (which loads into local Docker). Use --push to a registry, or build one platform at a time with --load.--cache-from and --cache-to with registry or local cache backends.--platform in FROM - in multi-stage builds, the build stage should use FROM --platform=$BUILDPLATFORM to run on the host architecture for speed, while the runtime stage inherits the target platform.