-
-
Notifications
You must be signed in to change notification settings - Fork 810
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (23 loc) · 844 Bytes
/
Copy pathDockerfile
File metadata and controls
30 lines (23 loc) · 844 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
FROM alpine:3.24
ARG TARGETARCH
ARG PUMPKIN_TAG=nightly
RUN apk add --no-cache curl ca-certificates && \
case "${TARGETARCH}" in \
"amd64") BIN_ARCH="X64" ;; \
"arm64") BIN_ARCH="ARM64" ;; \
*) echo "Unsupported architecture: ${TARGETARCH}" && exit 1 ;; \
esac && \
curl -fsSL "https://github.com/Pumpkin-MC/Pumpkin/releases/download/${PUMPKIN_TAG}/pumpkin-${BIN_ARCH}-Linux-musl" \
-o /usr/local/bin/pumpkin && \
chmod +x /usr/local/bin/pumpkin && \
apk del curl
RUN addgroup -g 2613 pumpkin && \
adduser -u 2613 -G pumpkin -D -h /pumpkin pumpkin && \
chown -R pumpkin:pumpkin /pumpkin
WORKDIR /pumpkin
USER pumpkin:pumpkin
ENV RUST_BACKTRACE=1
EXPOSE 25565
ENTRYPOINT [ "pumpkin" ]
HEALTHCHECK --interval=30s --timeout=3s --retries=3 \
CMD nc -z 127.0.0.1 25565 || exit 1