Skip to content

Commit 3ea7669

Browse files
committed
chore: build Docker image for arm64
1 parent f392d6e commit 3ea7669

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/docker.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
with:
3131
cosign-release: 'v2.2.4'
3232

33+
# Setup QEMU to be able to build images for multiple platforms
34+
- name: Set up QEMU
35+
uses: docker/setup-qemu-action@v3
36+
3337
# Set up BuildKit Docker container builder to be able to build
3438
# multi-platform images and export cache
3539
- name: Set up Docker Buildx
@@ -57,6 +61,7 @@ jobs:
5761
uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0
5862
with:
5963
context: .
64+
platforms: linux/amd64,linux/arm64
6065
push: ${{ github.event_name != 'pull_request' }}
6166
tags: ${{ steps.meta.outputs.tags }}
6267
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
FROM alpine:3.20 AS build
22

3-
RUN apk -U --no-cache add go alsa-lib-dev libogg-dev libvorbis-dev
3+
RUN apk -U --no-cache add go alsa-lib-dev libogg-dev libvorbis-dev gcc musl-dev
44

55
WORKDIR /src
66

77
COPY go.mod go.sum ./
88
RUN go mod download
99

1010
COPY . .
11-
RUN go build -v ./cmd/daemon
11+
RUN CGO_ENABLED=1 go build -v ./cmd/daemon
1212

1313
FROM alpine:3.20
1414

0 commit comments

Comments
 (0)