forked from Hetsh/docker-mindustry
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (26 loc) · 801 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (26 loc) · 801 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
31
FROM amd64/alpine:20230901
RUN apk update && \
apk add --no-cache \
openjdk17-jre-headless
# App user
ARG APP_USER="mindustry"
ARG APP_UID=1368
RUN adduser --disabled-password --uid "$APP_UID" --no-create-home --gecos "$APP_USER" --shell /sbin/nologin "$APP_USER"
# Server binary
ARG APP_VERSION=146
ARG APP_BIN="/opt/server.jar"
RUN wget \
--quiet \
--output-document "$APP_BIN" \
"https://github.com/Anuken/Mindustry/releases/download/v$APP_VERSION/server-release.jar"
# Volumes
ARG DATA_DIR="/mindustry"
RUN mkdir "$DATA_DIR" && \
chown -R "$APP_USER":"$APP_USER" "$DATA_DIR"
VOLUME ["$DATA_DIR"]
# GAME STATUS
EXPOSE 6567/udp 6567/tcp
USER "$APP_USER"
WORKDIR "$DATA_DIR"
ENV APP_BIN="$APP_BIN"
ENTRYPOINT exec java $JAVA_OPT -jar "$APP_BIN"