-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
70 lines (57 loc) · 2.2 KB
/
Copy pathDockerfile
File metadata and controls
70 lines (57 loc) · 2.2 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# syntax=docker/dockerfile:1.7
ARG MCC_VERSION=20260829-511
FROM alpine:3.22 AS fetch
ARG TARGETARCH
ARG MCC_VERSION
RUN apk add --no-cache ca-certificates curl
RUN set -eux; \
case "$TARGETARCH" in \
amd64) \
asset_arch="x64"; \
expected_sha256="2e0fe135079824d1b02a3ef9bf89c56d95d72a1d1502d7204f93acc0084223db" \
;; \
arm64) \
asset_arch="arm64"; \
expected_sha256="305dc0766df3509008cc00bb4ebd6be8246f01aff7b84409e0856a98fb759925" \
;; \
*) \
echo "Unsupported architecture: $TARGETARCH" >&2; \
exit 1 \
;; \
esac; \
url="https://github.com/MCCTeam/Minecraft-Console-Client/releases/download/$MCC_VERSION/MinecraftClient-$MCC_VERSION-linux-$asset_arch"; \
curl --fail --location --retry 3 --output /MinecraftClient "$url"; \
echo "$expected_sha256 /MinecraftClient" | sha256sum -c -; \
chmod 0755 /MinecraftClient
FROM debian:bookworm-slim
ARG MCC_VERSION=20260829-511
ARG VERSION=dev
ARG REVISION=unknown
LABEL org.opencontainers.image.title="Ploos-AS Minecraft Console Client" \
org.opencontainers.image.description="Ready-to-run Minecraft Console Client container" \
org.opencontainers.image.source="https://github.com/Ploos-AS/minecraft-console-client" \
org.opencontainers.image.url="https://github.com/Ploos-AS/minecraft-console-client" \
org.opencontainers.image.version="$VERSION" \
org.opencontainers.image.revision="$REVISION" \
org.opencontainers.image.licenses="GPL-3.0-or-later" \
io.ploos.mcc.upstream.version="$MCC_VERSION"
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ca-certificates \
libc6 \
libgcc-s1 \
libgssapi-krb5-2 \
libicu72 \
libssl3 \
libstdc++6 \
zlib1g \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --gid 1000 mcc \
&& useradd --uid 1000 --gid 1000 --home-dir /opt/data --create-home --shell /usr/sbin/nologin mcc \
&& mkdir -p /opt/data \
&& chown -R mcc:mcc /opt/data
COPY --from=fetch --chown=mcc:mcc /MinecraftClient /usr/local/bin/MinecraftClient
WORKDIR /opt/data
USER mcc
VOLUME ["/opt/data"]
ENTRYPOINT ["/usr/local/bin/MinecraftClient"]