conductor/Dockerfile
Renovate Bot 86e6b37baa
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
ci/woodpecker/pr/woodpecker Pipeline was successful
ci/woodpecker/pull_request_closed/woodpecker Pipeline was successful
chore(deps): update debian docker tag to v12
2024-06-10 09:30:44 +00:00

31 lines
1 KiB
Docker

FROM rust:latest as planner
RUN cargo install cargo-chef
WORKDIR /src
COPY . /src/
RUN cargo chef prepare --recipe-path recipe.json
FROM rust:latest as cacher
WORKDIR /src/
RUN cargo install cargo-chef
COPY --from=planner /src/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
FROM rust:latest as rust
WORKDIR /src
COPY . .
COPY --from=cacher /src/target target
#COPY --from=frontend /src/static/cache/bundle/ /src/static/cache/bundle/
RUN cargo --version
#RUN make cache-bust
RUN cargo build --release
FROM debian:bookworm as conductor
LABEL org.opencontainers.image.source https://git.batsense.net/librepages/conductor
RUN apt-get update && apt-get install -y ca-certificates
RUN useradd -ms /bin/bash -u 1001 conductor
WORKDIR /home/conductor
COPY --from=rust /src/target/release/conductor /usr/local/bin/
#COPY --from=rust /src/config/default.toml /etc/conductor/config.toml
RUN mkdir /var/lib/conductor && chown conductor:conductor /var/lib/conductor
USER conductor
CMD [ "/usr/local/bin/conductor" ]