From 847f8852cc48f7064b15d748debe689295f2f24a Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 15 Mar 2023 14:54:49 -0700 Subject: [PATCH 1/2] Re-re-add arm64 build --- .github/workflows/docker-publish.yml | 6 ++++++ Dockerfile | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 5a09d10..c6170de 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -27,6 +27,11 @@ jobs: with: submodules: true + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64' + - name: Setup Docker buildx uses: docker/setup-buildx-action@v2 @@ -56,6 +61,7 @@ jobs: uses: docker/build-push-action@v4 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 63217d9..bf90ce5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,4 +23,4 @@ RUN apt-get update && apt-get install -y libssl1.1 ca-certificates && rm -rf /va COPY entrypoint.sh /usr/local/bin/seabird-entrypoint.sh COPY --from=builder /usr/local/bin/seabird-* /usr/local/bin/ EXPOSE 11235 -CMD ["seabird-entrypoint.sh"] +CMD ["/usr/local/bin/seabird-entrypoint.sh"] From 98c516548ae00772ecd2b9d8786ac2e266ec9bb9 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 15 Mar 2023 15:01:53 -0700 Subject: [PATCH 2/2] Add workaround for OOM with arm64 builds --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index bf90ce5..74d6eb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,11 @@ FROM rust:1.68-bullseye as builder WORKDIR /usr/src/app +# Workaround to allow arm64 builds to work properly +ENV CARGO_NET_GIT_FETCH_WITH_CLI=true + +# We currently use protoc rather than relying on the protobuf-sys package +# because it greatly cuts down on build times. This may change in the future. RUN apt-get update && apt-get install -y protobuf-compiler && rm -rf /var/lib/apt/lists/* # Copy over only the files which specify dependencies