File tree Expand file tree Collapse file tree 2 files changed +20
-12
lines changed
Expand file tree Collapse file tree 2 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ This also give you easy access to the items in the data folder to allow you to d
2323
2424### Using Docker Compose
2525Instead of remembering and typing long chains of parameters and docker options you can create a docker-compose.yml file
26- (example [ here] ( docker-compose.yml ) ) file
26+ (example [ here] ( docker-compose.yml ) )
2727and simply run the command ` docker-compose up ` to bring up the server with a specified data folder and then use the
2828command ` docker-compose down ` to stop and get rid of the container. Later when you wish to restart the server you can
2929run ` docker-compose up ` again and the world persisted on your local volume will be attached to a new container running a
Original file line number Diff line number Diff line change 1- FROM azul/zulu- openjdk-alpine:8u212 -jre
1+ FROM openjdk:11 -jre-slim
22MAINTAINER colincoleman
33
4- RUN mkdir -p /home/minecraft/data
4+ RUN useradd -r -u 200 -m -c "minecraft account" -d /home/minecraft -s /bin/false minecraft
55
6- COPY entrypoint.sh /home/minecraft/
6+ ADD https://launchermeta.mojang.com/mc/game/version_manifest.json /home/minecraft/version_manifest.json
77
8- RUN apk update &&\
9- apk add jq
8+ RUN apt-get update && \
9+ apt-get install -y \
10+ jq \
11+ wget && \
12+ LATESTVER=`cat /home/minecraft/version_manifest.json|jq -r .latest.release` &&\
13+ wget -O /home/minecraft/versionfile.json `cat /home/minecraft/version_manifest.json | jq -r ".versions[] | select(.id==\" $LATESTVER\" )|.url" ` &&\
14+ DOWNLOADURL=`cat /home/minecraft/versionfile.json |jq -r '.downloads.server.url' ` &&\
15+ wget -O /home/minecraft/server.jar $DOWNLOADURL &&\
16+ apt-get remove -y \
17+ jq \
18+ wget && \
19+ rm -rf /var/lib/apt/lists/* && \
20+ mkdir /home/minecraft/data && \
21+ chown minecraft:minecraft /home/minecraft/data &&
1022
11- ADD https://launchermeta.mojang.com/mc/game/version_manifest.json /home/ minecraft/version_manifest.json
23+ USER minecraft
1224
13- RUN LATESTVER=`cat /home/minecraft/version_manifest.json|jq -r .latest.release` &&\
14- wget -O /home/minecraft/versionfile.json `cat /home/minecraft/version_manifest.json | jq -r ".versions[] | select(.id==\" $LATESTVER\" )|.url" ` &&\
15- DOWNLOADURL=`cat /home/minecraft/versionfile.json |jq -r '.downloads.server.url' ` &&\
16- wget -O /home/minecraft/server.jar $DOWNLOADURL &&\
17- echo "done"
25+ COPY entrypoint.sh /home/minecraft/
1826
1927ENTRYPOINT ["/home/minecraft/entrypoint.sh" ]
You can’t perform that action at this time.
0 commit comments