Public Repository

Last pushed: 16 days ago
Short Description
Minecraft Server
Full Description

Minecraft Server

Running The Server

Pull the image
docker pull tighek/minecraft_server1.9:latest
Create a container and publish the required tcp/udp ports
docker run -d --name minecraft -p 25565:25565 -p 25565:25565/udp -t tighek/minecraft_server:latest

Minecraft runs as user "minecraft" within the container.

Managing Data

I wanted an easy solution to persistent data between so I migrated world data and config files
to /srv/minecraft/custom with symlinks to where the files should be in /srv/minecraft.

Created the data container
docker create -v /srv/minecraft/custom --name minecraft_data ubuntu:16.04 /bin/true
Create your Minecraft server container that uses the data only container
docker run -d --name minecraft --volumes-from minecraft_data -p 25565:25565 -p 25565:25565/udp -t tighek/minecraft_server:latest

Migrating Data

To manage data in the data only container for things such as server setting or backups, I created a maintenance container which access the data only container and a local volume on the host.

Create the Minecraft Maintenance container
docker run --rm --volumes-from minecraft_container_name -v //srv/mc_maint:/mc_maint -i -t ubuntu /bin/bash
Docker Pull Command