Skip to content

Commit

Permalink
Merge pull request #118 from n01e0/n01e0-patch-1
Browse files Browse the repository at this point in the history
build for musl image
  • Loading branch information
n01e0 authored Nov 1, 2024
2 parents 90fdd11 + 4979b7a commit 86d716d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ serde_yaml = "0.9.34"
#thiserror = "1.0.50"
tokio = { version="1.41.0", features=["macros", "rt-multi-thread"] }
jwalk = "0.8.1"
git2 = "0.19.0"
git2 = { version="0.19.0", features=["vendored-openssl"] }
git-url-parse = "0.4.5"
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM rust:latest AS builder
WORKDIR /build
COPY . /build
RUN apt-get update && apt-get install -yqq pkg-config libssl-dev
RUN cargo build --release --target=x86_64-unknown-linux-gnu
RUN apt-get update && apt-get install -yqq musl musl-tools pkg-config libssl-dev
RUN rustup target add x86_64-unknown-linux-musl
RUN cargo build --release --target=x86_64-unknown-linux-musl

FROM alpine:latest
COPY --from=builder /build/target/release/ppb /ppb
COPY --from=builder /build/target/x86_64-unknown-linux-musl/release/ppb /ppb
ENTRYPOINT ["/ppb"]

0 comments on commit 86d716d

Please sign in to comment.