mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-19 19:15:08 +02:00
bincode 2 required Rust 1.85, so our options are to switch to Alpine edge or to use the rust image. While using the rust image results in a statically linked binary, this does not actually increase the size of the image, as we were already using jemalloc, so almost nothing of libc is actually used.
17 lines
357 B
Docker
17 lines
357 B
Docker
FROM docker.io/library/rust:alpine AS builder
|
|
|
|
WORKDIR /build
|
|
RUN apk add --no-cache build-base tini-static
|
|
|
|
ARG MINEDMAP_VERSION
|
|
|
|
COPY . .
|
|
RUN cargo build -r
|
|
RUN strip target/release/minedmap
|
|
|
|
FROM scratch
|
|
|
|
COPY --from=builder /sbin/tini-static /build/target/release/minedmap /bin/
|
|
ENTRYPOINT [ "/bin/tini-static", "--", "/bin/minedmap" ]
|
|
|
|
USER 1000:1000
|