mimise/spigot
Minecraft Micro Service tries to get a minecraft server as a micro service.
This repository holds spigot containers.
This image provides support for amd64 and arm/v7 (Raspberry Pi).
This image provides all spigot versions from version 1.8.
docker run -d --name <container_name> -e EULA=true mimise/spigot:<minecraft version>
Note: Replace the placeholders.
By passing the environment variable EULA=true
to the container you agree to the minecraft EULA.
Without to set the environment variable EULA
to true
the minecraft container will not start.
You can set the initial (min) and the maximum RAM to start the minecraft server by following environment parameters.
... -e MIN_RAM=1024M ...
... -e MAX_RAM=1024M ...
The default of both values is 1024M.
You can execute commands on server using docker exec.
docker exec <container_name> rcon <command>
Note: Replace the placeholders.
If you want to use rcon outside from docker you need to set the rcon password.
... -e RCON_PASSWORD=<password> ...
You also need to publish the rcon port to the outside of docker.
... -p <outside rcon port>:25575 ...
Now you can connect to the minecraft server using rcon.
If you want to change the rcon port inside the container.
... -e RCON_PORT=<port> ...
To get a feeling of a micro service the files separated between configs and data.
To bind data to a local folder use.
... -v `pwd`/data:/data ...
Data:
Please note, that all worlds saved in the folder worlds
.
If you want to change settings you can use the config folder. Just place the file in a config folder and mount it to the container.
... -v `pwd`/config:/config ...
Config:
There are other files from a minecraft server where you not have access to.
Why I can't access the logs?
As this image tries to create a micro service logs should handled via the container stdout.
You can install plugins in two different ways:
Mount /plugins folder
... -v `pwd`/plugins:/plugins ...
Create new image
Create a new Dockerfile.
FROM mimise/spigot:<minecraft version>
COPY plugin.jar /plugins/plugin.jar
And build the docker image.
docker build -t own-spigot .
You can mount the world to the host:
... -v `pwd`/worlds:/worlds ...
If you having a network with minigames for example please consider adding the world in the image and use that to run your server.
Create a new Dockerfile and add following contents.
FROM mimise/spigot:<minecraft version>
COPY game-map /worlds/game-map
And build the docker image.
docker build -t game-server .
If you want to use this minecraft container with a proxy you need to deploy on of these proxies.
That the proxy can communicate with the minecraft container you need to add it to the same network.
... --network="proxy" ...
Either you change the settings manually in the config or you can use the provided environment variable to change the settings automatically.
... -e PROXY=true ...
As the container are in the same network and you join via the proxy you don't need to expose the port from this container to the host.
So you can remove -p 25565:25565
from the run command.
docker pull mimise/spigot