diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 5177a8c..2784906 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -28,7 +28,7 @@ jobs: with: context: . push: true - platforms: linux/arm64 + platforms: linux/amd64 tags: | easybill/spf-check:${{ github.ref_name }} easybill/spf-check:latest diff --git a/Dockerfile b/Dockerfile index 2f3699f..eef82f5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,12 @@ FROM rust:1.84.1-slim-bookworm AS builder +# Install build dependencies including proc-macro requirements +RUN apt-get update && apt-get install -y \ + build-essential \ + pkg-config \ + libssl-dev \ + && rm -rf /var/lib/apt/lists/* + WORKDIR /usr/src/app # Copy the Cargo files to cache dependencies @@ -8,6 +15,8 @@ COPY Cargo.toml Cargo.lock ./ # Create a dummy main.rs to build dependencies RUN mkdir src && \ echo 'fn main() { println!("Dummy") }' > src/main.rs && \ + # Ensure the toolchain and target are properly installed + rustup target add x86_64-unknown-linux-gnu && \ cargo build --release && \ rm src/main.rs