diff --git a/.github/workflows/on-tag.yml b/.github/workflows/on-tag.yml index f3e200e0..d8d63f85 100644 --- a/.github/workflows/on-tag.yml +++ b/.github/workflows/on-tag.yml @@ -65,9 +65,9 @@ jobs: - name: Checkout project uses: actions/checkout@v3 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v3 - # id: qemu + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + id: qemu - name: Setup Docker buildx action uses: docker/setup-buildx-action@v3 @@ -90,7 +90,7 @@ jobs: docker buildx build \ --cache-from "type=local,src=/tmp/.buildx-cache" \ --cache-to "type=local,dest=/tmp/.buildx-cache" \ - --platform linux/amd64 \ + --platform linux/amd64,linux/arm64 \ --tag ${{ secrets.DOCKER_HUB_USER }}/electrs:$TAG \ --tag ${{ secrets.DOCKER_HUB_USER }}/electrs:latest \ --output "type=registry" . \ diff --git a/Dockerfile b/Dockerfile index b57becdc..5448893f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,19 @@ FROM debian:bookworm-slim AS base -RUN apt update -qy -RUN apt install -qy librocksdb-dev +ENV CARGO_NET_GIT_FETCH_WITH_CLI=true + +RUN apt update -qy && \ + apt install -qy librocksdb-dev curl FROM base as build -RUN apt install -qy git cargo clang cmake +RUN apt install -qy git clang cmake + +ENV RUSTUP_HOME=/rust +ENV CARGO_HOME=/cargo +ENV PATH=/cargo/bin:/rust/bin:$PATH + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y WORKDIR /build COPY . .