17 lines
813 B
Docker
17 lines
813 B
Docker
FROM rust:1.75.0 as builder
|
|
|
|
WORKDIR /usr/src/chaospott-status
|
|
# git clone anstatt copy, damit Dockerfile in extra repository liegen kann. Danke @a3x
|
|
# git ist im image enthalten, da rust image hiervon abstammt https://hub.docker.com/layers/library/buildpack-deps/bookworm-scm/images/sha256-25f20fd3e3c8be1e9626c246986beb400ccfe19b0ab13d57127399927801d499?context=explore
|
|
RUN git clone https://git.chaospott.de/Chaospott/chaospott-status.git .
|
|
|
|
# use musl to create a truly static binary https://bxbrenden.github.io/
|
|
RUN rustup component add rust-std-x86_64-unknown-linux-musl
|
|
RUN cargo build --release --target x86_64-unknown-linux-musl
|
|
|
|
FROM scratch
|
|
COPY --from=builder /usr/src/chaospott-status/target/x86_64-unknown-linux-musl/release/chaospott-status /chaospott-status
|
|
|
|
EXPOSE 3000
|
|
|
|
CMD ["/chaospott-status"] |