git-next/Dockerfile
Paul Campbell 8975e30d10
All checks were successful
Test / build (map[name:stable]) (push) Successful in 10m40s
Test / build (map[name:nightly]) (push) Successful in 11m53s
Release Please / Release-plz (push) Successful in 33s
Release Please / Docker image (push) Successful in 8m15s
build: build release image using alpine linux
2025-01-16 19:25:23 +00:00

25 lines
747 B
Docker

# Leveraging the pre-built Docker images with
# cargo-chef and the Rust toolchain
FROM git.kemitix.net/kemitix/rust:v4.0.1 AS chef
WORKDIR /app
RUN apk add --no-cache dbus-dev=1.14.10-r4 && rm -rf /vra/cache/apk/*
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 chef AS runtime
WORKDIR /app
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" ]