Public | Automated Build

Last pushed: 2 months ago
Short Description
Docker Image to run a Minecraft Server
Full Description

Minecraft Docker Image


There are many Minecraft Docker images already developed, why develop another?

From what I was able to find, no Minecraft Docker image currently handles signals. That means when a docker stop command is issued, Docker will attempt to signal the process to gracefully quits, but the process ignores it. Docker then terminates the server without the Minecraft server saving the state, leaving the potential of corrupted data.

By writing a simple wrapper (, this image is able to process the SIGTERM signal that is sent by Docker during a docker stop command. That is then turned into an RCON call, which instructs the server to safely exit and close.

In order to keep simplicity, the container will be mounted to paths on the host disk. This will allow existing automation that manages things like ops.txt or to continue to work.

Usage (Vanilla Minecraft)

# Copy configuraitons into Minecraft directory (If you have automation in
# place, run that here; that shouldn't need to change).
mkdir -p /srv/minecraft/
cp ~/ /srv/minecraft/
echo "eula=true" > /srv/minecraft/eula.txt"

# Start Minecraft Server
docker run \
  -v /srv/minecraft/:/minecraft/:rw \
  --publish 25565:25565 \

Options & Settings


Option Expected Value Location
enable-rcon true
rcon.password Your RCON Password
rcon.port Your RCON Port
eula true eula.txt
MINECRAFT_VERSION Something like 1.11.2 Environment Variable


Option Description Default Value Location
JAVA_TOOL_OPTIONS JVM Settings, like heap size -Xmx1024M -Xms1024M Environment Variable
broadcast-rcon-to-ops Announce RCON commands to Server Ops false ??? TODO
Docker Pull Command
Source Repository