MinedMap/Dockerfile
Matthias Schiffer 3b5ce82873
docker: include Alpine base tools, tini
Including tini fixes forwarding signals to MinedMap, allowing to
interrupt it using Ctrl-C. The base tools may be used to add a wrapper
script to configure MinedMap with environment variables.

As the Alpine base is included now, we can switch from the rust:alpine
image to alpine:latest, resulting in MinedMap to be linked dynamically.
2025-02-21 10:55:50 +01:00

15 lines
365 B
Docker

FROM docker.io/library/alpine:latest AS BUILDER
WORKDIR /build
RUN apk add --no-cache build-base cmake cargo
COPY . .
RUN cargo build -r
RUN strip target/release/minedmap
FROM docker.io/library/alpine:latest
RUN apk add --no-cache libgcc tini
COPY --from=BUILDER /build/target/release/minedmap /bin/minedmap
ENTRYPOINT [ "/sbin/tini", "--", "/bin/minedmap" ]