Skip to content
This repository was archived by the owner on Jul 14, 2025. It is now read-only.

Commit f59bad0

Browse files
authored
use multiarch to build k3d image (#41)
Signed-off-by: jiaxiao zhou <[email protected]> changed rancher image to latest pin rancher k3d image removed build-k3d in build pipeline Signed-off-by: jiaxiao zhou <[email protected]>
1 parent 903daf6 commit f59bad0

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,3 @@ jobs:
5151
name: containerd-wasm-shims-v1-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
5252
path: _dist/containerd-wasm-shims-v1-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
5353
retention-days: 5
54-
- name: build k3d demo
55-
run: make build-image
56-
working-directory: ./deployments/k3d

.github/workflows/release.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545
_dist/slight_workload.yaml#example-slight-workloads
4646
4747
for f in ./_artifacts/*/*.tar.gz; do gh release upload ${{ env.RELEASE_VERSION }} $f; done
48-
48+
4949
# Setup buildx to build multiarch image: https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
5050
- name: Set up QEMU
5151
uses: docker/setup-qemu-action@v2
@@ -97,6 +97,7 @@ jobs:
9797
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:${{ env.RELEASE_VERSION }}
9898
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:latest
9999
context: deployments/k3d
100+
platforms: linux/amd64,linux/arm64
100101
- name: clear
101102
if: always()
102103
run: |

deployments/k3d/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM rancher/k3s:v1.24.4-k3s1-amd64
1+
FROM rancher/k3s:v1.24.6-k3s1
22

33
# copy shims from target directory into the /bin
44
COPY ./.tmp /bin/

deployments/k3d/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ move-musl-to-tmp: compile-musl-spin compile-musl-slight
1515
cp ../../containerd-shim-spin-v1/target/$(TARGET)/release/containerd-shim-*-v1 ./.tmp/
1616

1717
build-image: move-musl-to-tmp
18-
docker build -t $(IMAGE_NAME) .
18+
docker buildx build -t $(IMAGE_NAME) --platform linux/amd64,linux/arm64 .
1919

2020
up: build-image
2121
k3d cluster create $(CLUSTER_NAME) --image $(IMAGE_NAME) --api-port 6550 -p "8081:80@loadbalancer" --agents 1

0 commit comments

Comments
 (0)