diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 655f8cb..4289e69 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -37,6 +37,7 @@ jobs: # Workaround: https://github.com/docker/build-push-action/issues/461 - name: Setup Docker buildx uses: docker/setup-buildx-action@v2.5.0 + - uses: docker/setup-qemu-action@v2 # Login against a Docker registry except on PR # https://github.com/docker/login-action @@ -63,6 +64,7 @@ jobs: uses: docker/build-push-action@v4.0.0 with: context: . + platforms: linux/amd64,linux/arm64 push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile b/Dockerfile index a56afd1..502b41c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM alpine AS curl +FROM alpine --platform=$TARGETOS/$TARGETARCH AS curl # Install build dependencies RUN apk add openssl-dev make g++ curl @@ -15,7 +15,10 @@ RUN ./configure --with-openssl --enable-websockets # Compile RUN make && make install -FROM alpine +FROM --platform=$TARGETOS/$TARGETARCH alpine + +LABEL org.opencontainers.image.source="https://github.com/kordlib/docker" +LABEL org.opencontainers.image.licenses=MIT # See https://youtrack.jetbrains.com/issue/KT-38876/#focus=Comments-27-4805258.0-0 RUN apk add gcompat