Mincecraft Paper Spigot
docker-compose
Steve Thielemann 29eea5078a Minor changes. | 6 years ago | |
---|---|---|
data | 6 years ago | |
mc-java | 6 years ago | |
docker-compose.yml | 7 years ago | |
readme.md | 6 years ago |
This is Minecraft, running under docker, using docker-compose.
https://docs.docker.com/engine/installation/linux/linux-postinstall/
In the docker-compose.yml, set UID and GID to the numerical IDs of your current user account. The image will use the default values 1000 as defined the the Dockerfile.
Or, if you're having errors starting up, just docker-compose up.
This will display the logs to the console. Ctrl-c stops the container. Ctrl-p, Ctrl-q detaches the console.
Edit docker-compose.yml file to set the port.
ports:
- "25565:25565"
The first number is the external port that everyone connects in on, which is the default Minecraft port. The second number is the port the minecraft server listens on.
To use port 20065, change to:
ports:
- "20065:25565"
Note: You'll need to use 20065 in the Minecraft client to this non-standard port number.
I don't recommend you change the Minecraft port number on the server side. There's no need to with Docker! But, if you really, really want to, here's what you in for:
Rebuild the image with docker-compose build.
This docker image will use rcon to send a message to users, sleep 1 second, issue /save-all, sleep 1 second, and /stop.
In order for this to work rcon must be enabled in server.properties.
In data/server.properties set:
The shutdown message and delays are in the mc-java/launch.sh script in the save_shutdown() function. Be careful making the delays too long! Docker sends SIG_TERM, waits 10 seconds, and then sends SIG_KILL.
**Yes, so long as you don't expose the rcon port **25575 to the world in docker-compose.yml. If you do expose the rcon port, then you must change the rcon.password and update the docker image launch.sh script. In launch.sh change the rcon port and password information on the line starting with RCON=. Expose the rcon port by adding a line to the ports section of the docker-compose.yml.
This image doesn't just run paper. It'll run any minecraft server. Just grab the server jar file, copy into data directory, edit docker-compose.yml file and edit the environment SERVER value to match the name of your jar file.
https://ci.destroystokyo.com/job/PaperSpigot/
(need link)
For giving me my first taste of running minecraft server under docker.
And for the headaches from trying to update minecraft versions that made me want to try to build my own image.