mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-04-12 00:05:07 +02:00
Dockerfile: switch back to docker.io/library/rust:alpine image
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.
This commit is contained in:
parent
b1c0f316cb
commit
fbdd5ed457
1 changed files with 6 additions and 11 deletions
17
Dockerfile
17
Dockerfile
|
@ -1,7 +1,7 @@
|
|||
FROM docker.io/library/alpine:latest AS builder
|
||||
FROM docker.io/library/rust:alpine AS builder
|
||||
|
||||
WORKDIR /build
|
||||
RUN apk add --no-cache build-base cargo
|
||||
RUN apk add --no-cache build-base tini-static
|
||||
|
||||
ARG MINEDMAP_VERSION
|
||||
|
||||
|
@ -9,14 +9,9 @@ COPY . .
|
|||
RUN cargo build -r
|
||||
RUN strip target/release/minedmap
|
||||
|
||||
FROM docker.io/library/alpine:latest
|
||||
FROM scratch
|
||||
|
||||
RUN addgroup -g 1000 -S minedmap \
|
||||
&& adduser -S -D -H -u 1000 -h /output -s /sbin/nologin -G minedmap -g minedmap minedmap
|
||||
COPY --from=builder /sbin/tini-static /build/target/release/minedmap /bin/
|
||||
ENTRYPOINT [ "/bin/tini-static", "--", "/bin/minedmap" ]
|
||||
|
||||
RUN apk add --no-cache libgcc tini
|
||||
|
||||
COPY --from=builder /build/target/release/minedmap /bin/minedmap
|
||||
ENTRYPOINT [ "/sbin/tini", "--", "/bin/minedmap" ]
|
||||
|
||||
USER minedmap:minedmap
|
||||
USER 1000:1000
|
||||
|
|
Loading…
Add table
Reference in a new issue