User Tools

Site Tools


gitlab-ci-multiplatform

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
gitlab-ci-multiplatform [2021/01/09 09:49] – [Create buildx enabled docker image for builds] baumigitlab-ci-multiplatform [2021/01/09 10:07] (current) – [Enable Emulators] baumi
Line 1: Line 1:
 ====== Gitlab CI MultiPlatform Build ====== ====== Gitlab CI MultiPlatform Build ======
  
-===== Enable Emulators ===== +===== Enable binary formats ===== 
-<code> +<code bash
-docker run -it --rm --privileged tonistiigi/binfmt --install all+docker run --rm --privileged tonistiigi/binfmt --install all
 { {
   "supported": [   "supported": [
Line 26: Line 26:
 ===== Create buildx enabled docker image for builds ===== ===== Create buildx enabled docker image for builds =====
 <file bash Dockerfile> <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 /docker-buildx \
 +  "https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-amd64"
 +
 +RUN chmod a+x /docker-buildx
 +
 +ARG DOCKER_VERSION
 +FROM docker:${DOCKER_VERSION}
 +
 +COPY --from=fetcher /docker-buildx /usr/lib/docker/cli-plugins/docker-buildx
 </file> </file>
  
-Build image+Credits to [[https://github.com/jdrouet|Jérémie Drouet]] 
 + 
 +==== Build & push image ====
  
 <code bash> <code bash>
gitlab-ci-multiplatform.1610182175.txt.gz · Last modified: 2021/01/09 09:49 by baumi

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki