diff --git a/Cargo.lock b/Cargo.lock index 7eb8eab..5fd788c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1037,6 +1037,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.4.0+3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a709e02f2b4aca747929cca5ed248880847c650233cf8b8cdc48f40aaf4898a6" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.104" @@ -1045,6 +1054,7 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/Cargo.toml b/Cargo.toml index ca0efee..9a10de6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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" diff --git a/Dockerfile b/Dockerfile index 1107fe0..2eab81f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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"]