git-next/Dockerfile
Paul Campbell e34d5c2c2c
Some checks failed
ci/woodpecker/tag/cron-docker-builder Pipeline was successful
ci/woodpecker/tag/push-next Pipeline was successful
ci/woodpecker/tag/tag-created Pipeline was successful
ci/woodpecker/push/cron-docker-builder Pipeline failed
ci/woodpecker/push/push-next Pipeline failed
ci/woodpecker/push/tag-created Pipeline failed
ci/woodpecker/cron/cron-docker-builder Pipeline was successful
ci/woodpecker/cron/push-next Pipeline was successful
ci/woodpecker/cron/tag-created Pipeline was successful
build(docker): clean up and update debian version
2024-05-12 18:35:47 +01:00

29 lines
856 B
Docker

# Leveraging the pre-built Docker images with
# cargo-chef and the Rust toolchain
FROM git.kemitix.net/kemitix/git-next-builder:latest 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 && \
strip target/release/git-next
FROM docker.io/debian:stable-20240423-slim AS runtime
WORKDIR /app
RUN apt-get update && \
apt-get install --no-install-recommends -y \
libssl3=3.0.11-1~deb12u2 \
ca-certificates=20230311 \
&& \
rm -rf /var/lib/apt/lists/*
USER 1000
COPY --from=builder /app/target/release/git-next /usr/local/bin
ENTRYPOINT [ "/usr/local/bin/git-next", "server", "start" ]