git-next/Dockerfile
Renovate Bot 39dbc9b902
All checks were successful
ci/woodpecker/pr/cron-docker-builder Pipeline was successful
ci/woodpecker/pr/push-next Pipeline was successful
ci/woodpecker/pr/tag-created Pipeline was successful
Rust / build (map[name:nightly]) (push) Successful in 9m9s
Rust / build (map[name:stable]) (push) Successful in 10m28s
Rust / build (map[name:nightly]) (pull_request) Successful in 7m48s
Rust / build (map[name:stable]) (pull_request) Successful in 9m15s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 5m18s
ci/woodpecker/pull_request_closed/cron-docker-builder Pipeline was successful
ci/woodpecker/pull_request_closed/push-next Pipeline was successful
ci/woodpecker/pull_request_closed/tag-created Pipeline was successful
chore(deps): update git.kemitix.net/kemitix/git-next-builder docker tag to v2024.12.28
2024-12-28 14:16:47 +00:00

30 lines
907 B
Docker

# Leveraging the pre-built Docker images with
# cargo-chef and the Rust toolchain
FROM git.kemitix.net/kemitix/git-next-builder:2024.12.28 AS chef
WORKDIR /app
FROM chef AS planner
COPY Cargo.toml ./
COPY crates crates
RUN cargo chef prepare --recipe-path recipe.json
FROM chef AS builder
COPY --from=planner /app/recipe.json recipe.json
RUN cargo chef cook --profile release --recipe-path recipe.json
COPY . .
RUN cargo build --release --bin git-next --all-features && \
strip target/release/git-next
FROM docker.io/debian:stable-20240904-slim AS runtime
WORKDIR /app
RUN apt-get update && \
apt-get satisfy -y "git (>=2.39), libssl3 (>=3.0.14), libdbus-1-dev (>=1.14.10), ca-certificates (>=20230311)" \
&& \
rm -rf /var/lib/apt/lists/*
USER 1000
COPY --from=builder /app/target/release/git-next /usr/local/bin
ENV HOME=/app
ENTRYPOINT [ "/usr/local/bin/git-next" ]
CMD [ "server", "start" ]