Fingerlink/Dockerfile.serveonly
Karcsesz 6cd503711f
All checks were successful
/ cargo test (push) Successful in 20s
Server only docker image
2024-04-01 16:53:23 +02:00

24 lines
No EOL
554 B
Text

FROM rust:latest as builder
LABEL authors="karcsesz"
ARG target=x86_64-unknown-linux-musl
RUN apt update && apt install -y musl-tools musl-dev
RUN update-ca-certificates
RUN rustup target add $target
WORKDIR /fingerlink
COPY . .
RUN cargo build --target $target --release --no-default-features --features server
FROM scratch
ENV PATH="${PATH}:/fingerlink"
WORKDIR /fingerlink
COPY --from=builder /fingerlink/target/x86_64-unknown-linux-musl/release/fingerlink /fingerlink/fingerlink
ENTRYPOINT ["/fingerlink/fingerlink", "serve"]
CMD ["--help"]