gitlab-ci-multiplatform
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| gitlab-ci-multiplatform [2025/09/11 09:43] – [Switch to buildx in .gitlab-ci.yml] baumi | gitlab-ci-multiplatform [2025/09/11 09:43] (current) – removed baumi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Gitlab CI MultiPlatform Build ====== | ||
| - | |||
| - | ===== Enable binary formats ===== | ||
| - | <code bash> | ||
| - | $ docker run --rm --privileged tonistiigi/ | ||
| - | { | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | ], | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | " | ||
| - | ] | ||
| - | } | ||
| - | </ | ||
| - | ===== Create buildx enabled docker image for builds ===== | ||
| - | <file bash Dockerfile> | ||
| - | ARG BUILDX_VERSION=0.4.2 | ||
| - | ARG DOCKER_VERSION=latest | ||
| - | |||
| - | FROM alpine AS fetcher | ||
| - | |||
| - | RUN apk add curl | ||
| - | |||
| - | ARG BUILDX_VERSION | ||
| - | RUN curl -L \ | ||
| - | --output / | ||
| - | " | ||
| - | |||
| - | RUN chmod a+x / | ||
| - | |||
| - | ARG DOCKER_VERSION | ||
| - | FROM docker: | ||
| - | |||
| - | COPY --from=fetcher / | ||
| - | </ | ||
| - | |||
| - | Credits to [[https:// | ||
| - | |||
| - | ==== Build & push image ==== | ||
| - | |||
| - | <code bash> | ||
| - | $ docker build --pull -t registry/ | ||
| - | $ docker push registry/ | ||
| - | </ | ||
| - | |||
gitlab-ci-multiplatform.1757576619.txt.gz · Last modified: by baumi
