1
0
Fork 0
mirror of https://codeberg.org/Mo8it/git-webhook-client synced 2024-10-18 07:22:39 +00:00
git-webhook-client/Containerfile

22 lines
638 B
Text
Raw Permalink Normal View History

2022-12-24 22:46:21 +00:00
FROM docker.io/library/rust:latest AS chef
2022-12-24 19:17:58 +00:00
RUN cargo install cargo-chef
WORKDIR app
FROM chef AS planner
COPY . .
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
2022-12-24 22:46:21 +00:00
RUN apt update && \
apt install libsqlite3-dev -y
2022-12-24 19:17:58 +00:00
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release --bin git-webhook-client
2022-12-24 22:46:21 +00:00
FROM docker.io/library/debian:stable-slim AS runtime
2022-12-24 19:17:58 +00:00
WORKDIR app
2022-12-24 22:46:21 +00:00
RUN apt update && \
apt install libsqlite3-dev -y
2022-12-24 19:17:58 +00:00
COPY --from=builder /app/target/release/git-webhook-client /usr/local/bin/git-webhook-client
CMD ["git-webhook-client"]