diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 8a616db..8f1855a 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -19,6 +19,9 @@ jobs: - name: Check Out Repo uses: actions/checkout@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + - name: Docker meta id: meta uses: docker/metadata-action@v3 @@ -51,6 +54,7 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + platforms: linux/amd64,linux/arm64 cache-from: type=gha cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile index c34ba40..408d399 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,6 +6,10 @@ COPY . . RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder + +# Ensure working C compile setup (not installed by default in arm64 images) +RUN apt update && apt install build-essential -y + COPY --from=planner /app/recipe.json recipe.json RUN cargo chef cook --release --recipe-path recipe.json