Skip to content

Commit

Permalink
use multiarch to build k3d image (#41)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Mossaka authored Oct 14, 2022
1 parent 903daf6 commit f59bad0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,3 @@ jobs:
name: containerd-wasm-shims-v1-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}
path: _dist/containerd-wasm-shims-v1-${{ env.RUNNER_OS }}-${{ matrix.config.arch }}.tar.gz
retention-days: 5
- name: build k3d demo
run: make build-image
working-directory: ./deployments/k3d
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
_dist/slight_workload.yaml#example-slight-workloads
for f in ./_artifacts/*/*.tar.gz; do gh release upload ${{ env.RELEASE_VERSION }} $f; done
# Setup buildx to build multiarch image: https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -97,6 +97,7 @@ jobs:
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:${{ env.RELEASE_VERSION }}
ghcr.io/deislabs/containerd-wasm-shims/examples/k3d:latest
context: deployments/k3d
platforms: linux/amd64,linux/arm64
- name: clear
if: always()
run: |
Expand Down
2 changes: 1 addition & 1 deletion deployments/k3d/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM rancher/k3s:v1.24.4-k3s1-amd64
FROM rancher/k3s:v1.24.6-k3s1

# copy shims from target directory into the /bin
COPY ./.tmp /bin/
Expand Down
2 changes: 1 addition & 1 deletion deployments/k3d/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ move-musl-to-tmp: compile-musl-spin compile-musl-slight
cp ../../containerd-shim-spin-v1/target/$(TARGET)/release/containerd-shim-*-v1 ./.tmp/

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

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

0 comments on commit f59bad0

Please sign in to comment.