Skip to content

Commit

Permalink
🐳 Fix linking building
Browse files Browse the repository at this point in the history
  • Loading branch information
coreequip committed Feb 6, 2025
1 parent 4c9907d commit b7e02a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down

0 comments on commit b7e02a4

Please sign in to comment.