Skip to content

Commit 1441c17

Browse files
authored
Add arm64 support (#380)
* use arm64 supported curlimages/curl instead of busyboxplus:curl * use arm64 supported kvij/scuttle instead of redboxoss/scuttle redboxllc/scuttle#60 (comment) * remove explicit GOARCH=amd64 * build arm64 image with qemu, update workflow versions in push.yml * revert pushing worktree for branch working_arm64 by mistake * fix starter dockerfile * revert to buildx version 0.9.1 * keep USER 65532:65532
1 parent 55d949e commit 1441c17

File tree

4 files changed

+17
-12
lines changed

4 files changed

+17
-12
lines changed

.github/workflows/push.yaml

+13-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
workflow_dispatch:
66
inputs:
77
image_tag:
8-
description: 'Image tag name.'
8+
description: "Image tag name."
99
required: true
1010
release:
1111
types:
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: "Build:checkout"
20-
uses: actions/checkout@v2
20+
uses: actions/checkout@v4
2121
- name: "Set image tag name"
2222
run: |
2323
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
@@ -28,38 +28,43 @@ jobs:
2828
- name: "Check image tag name"
2929
run: |
3030
echo "IMAGETAG=${{env.IMAGETAG}}"
31+
- name: Set up QEMU
32+
uses: docker/setup-qemu-action@v3
3133
- name: "Build:buildx"
32-
uses: docker/setup-buildx-action@v1
34+
uses: docker/setup-buildx-action@v3
3335
with:
3436
version: v0.9.1 # Buildx version
3537
- name: "Build:login"
36-
uses: docker/login-action@v1
38+
uses: docker/login-action@v3
3739
with:
3840
registry: ghcr.io
3941
username: ${{ github.actor }}
4042
password: ${{ secrets.GITHUB_TOKEN }}
4143
- name: "Build:dockerimage"
42-
uses: docker/build-push-action@v2
44+
uses: docker/build-push-action@v5
4345
with:
4446
context: .
4547
push: true
4648
file: Dockerfile.controller
4749
build-args: |
4850
GO_BUILDER_IMG=golang:1.19
51+
platforms: linux/amd64,linux/arm64
4952
tags: ghcr.io/grafana/k6-operator:latest,ghcr.io/grafana/k6-operator:controller-${{env.IMAGETAG}}
5053
- name: "Build:dockerimage"
51-
uses: docker/build-push-action@v2
54+
uses: docker/build-push-action@v5
5255
with:
5356
context: .
5457
push: true
5558
file: Dockerfile.runner
59+
platforms: linux/amd64,linux/arm64
5660
tags: ghcr.io/grafana/k6-operator:latest-runner,ghcr.io/grafana/k6-operator:runner-${{env.IMAGETAG}}
5761
- name: "Build:dockerimage"
58-
uses: docker/build-push-action@v2
62+
uses: docker/build-push-action@v5
5963
with:
6064
context: .
6165
push: true
6266
file: Dockerfile.starter
67+
platforms: linux/amd64,linux/arm64
6368
tags: ghcr.io/grafana/k6-operator:latest-starter,ghcr.io/grafana/k6-operator:starter-${{env.IMAGETAG}}
6469

6570
bundle:
@@ -70,7 +75,7 @@ jobs:
7075
pull-requests: write
7176
steps:
7277
- name: "Checkout code"
73-
uses: actions/checkout@v2
78+
uses: actions/checkout@v4
7479
- name: "Set image tag name"
7580
run: |
7681
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then

Dockerfile.controller

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ COPY pkg/ pkg/
1818

1919

2020
# Build
21-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager main.go
21+
RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -a -o manager main.go
2222

2323
# Use distroless as minimal base image to package the manager binary
2424
# Refer to https://github.com/GoogleContainerTools/distroless for more details

Dockerfile.runner

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM grafana/k6:latest
22

3-
COPY --from=redboxoss/scuttle:latest scuttle /bin/scuttle
3+
COPY --from=kvij/scuttle:latest scuttle /bin/scuttle
44
ENTRYPOINT ["scuttle", "k6"]

Dockerfile.starter

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
FROM radial/busyboxplus:curl
1+
FROM curlimages/curl:latest
22

33
# as defined by distroless for nonroot
44
USER 65532:65532
5-
COPY --from=redboxoss/scuttle:latest /scuttle /bin/scuttle
5+
COPY --from=kvij/scuttle:latest /scuttle /bin/scuttle

0 commit comments

Comments
 (0)