File tree Expand file tree Collapse file tree 1 file changed +53
-0
lines changed
content/manuals/build/ci/github-actions Expand file tree Collapse file tree 1 file changed +53
-0
lines changed Original file line number Diff line number Diff line change 4545 tags : user/app:latest
4646` ` `
4747
48+ ## Build and load multi-platform images
49+
50+ The default Docker setup for GitHub Actions runners does not support loading
51+ multi-platform images to the local image store of the runner after building
52+ them. To load a multi-platform image, you need to enable the containerd image
53+ store option for the Docker Engine.
54+
55+ There is no way to configure the default Docker setup in the GitHub Actions
56+ runners directly, but you can use the ` crazy-max/ghaction-setup-docker` action
57+ to customize the Docker Engine and CLI settings for a job.
58+
59+ The following example workflow enables the containerd image store, builds a
60+ multi-platform image, and loads the results into the GitHub runner's local
61+ image store.
62+
63+ ` ` ` yaml
64+ name: ci
65+
66+ on:
67+ push:
68+
69+ jobs:
70+ docker:
71+ runs-on: ubuntu-latest
72+ steps:
73+ - name: Set up Docker
74+ uses: crazy-max/ghaction-setup-docker@v3
75+ with:
76+ daemon-config: |
77+ {
78+ "debug": true,
79+ "features": {
80+ "containerd-snapshotter": true
81+ }
82+ }
83+
84+ - name: Set up QEMU
85+ uses: docker/setup-qemu-action@v3
86+
87+ - name: Login to Docker Hub
88+ uses: docker/login-action@v3
89+ with:
90+ username: ${{ vars.DOCKERHUB_USERNAME }}
91+ password: ${{ secrets.DOCKERHUB_TOKEN }}
92+
93+ - name: Build and push
94+ uses: docker/build-push-action@v6
95+ with:
96+ platforms: linux/amd64,linux/arm64
97+ load: true
98+ tags: user/app:latest
99+ ` ` `
100+
48101# # Distribute build across multiple runners
49102
50103In the previous example, each platform is built on the same runner which can
You can’t perform that action at this time.
0 commit comments