Skip to content

Commit 1003710

Browse files
committed
ci: add multi-platform docker build (amd64 + arm64)
- Add QEMU for cross-platform emulation - Add platforms: linux/amd64,linux/arm64 - Update Dockerfile with build dependencies (musl-dev, openssl) - Add ca-certificates for HTTPS support in runtime image
1 parent e6e71a3 commit 1003710

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/docker.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,11 @@ jobs:
2525
- name: Checkout code
2626
uses: actions/checkout@v4
2727

28+
- name: Set up QEMU
29+
uses: docker/setup-qemu-action@v3
30+
2831
- name: Set up Docker Buildx
29-
uses: docker/setup-buildx-action@v2
32+
uses: docker/setup-buildx-action@v3
3033

3134
- name: Log in to Docker Hub
3235
uses: docker/login-action@v3
@@ -38,6 +41,7 @@ jobs:
3841
uses: docker/build-push-action@v6
3942
with:
4043
context: .
44+
platforms: linux/amd64,linux/arm64
4145
push: true
4246
tags: |
4347
rustfs/rc:${{ env.image_tag }}

Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,18 @@ LABEL maintainer="hello@rustfs.com"
44

55
WORKDIR /app
66

7+
# Install build dependencies for Alpine
8+
RUN apk add --no-cache musl-dev openssl-dev openssl-libs-static
9+
710
COPY . .
811

912
RUN cargo build --release
1013

1114
FROM alpine:3.23
1215

16+
# Install CA certificates for HTTPS
17+
RUN apk add --no-cache ca-certificates
18+
1319
COPY --from=builder /app/target/release/rc /usr/bin/rc
1420
COPY --from=builder /app/LICENSE-* /licenses/
1521

0 commit comments

Comments
 (0)