mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
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.
15 lines
365 B
Docker
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" ]
|