Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cargo setup method and enable arm64 builds again #108

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/on-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" . \
Expand Down
16 changes: 12 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,19 @@
FROM debian:bookworm-slim AS base
FROM debian:latest AS base

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason for removing slim? (latest is currently bookworm)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@junderw I misread your original message saying it was due to the ancient version Debian was using, so I ended up changing the Debian version without checking if bookworm wasn't already the latest. I'll change it back to slim.

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 . .
Expand Down
Loading