This is your ultimate docker container for running minecraft 1.7.10+ in any forms available, not wasting your resources.
Mount your server folder unter /srv/mcsrvod/ and rename your jar file to server.jar.
The container will start the attached jar file when an connection to port 3000 is etablished. This is the public port for minecraft, you can change the outside mapping to whatever you like.
You can specify the interval in seconds the server should shutdown than no one is online. To do so specify the environment variable KILL_INTERVAL
You can customize the jvm start arguments via an envrionment variable called JAVA_OPTS. Same goes for your server arguments, to specify them simply set the env for SERVER_OPTS
Please check if the eula.txt is created and its agreement is set, this must be done by yourself.
The server may need some time to completely start, till that you will see an long running poll. For normal installations this is normally not that long, depending on your machine power. For modpacks this may take some time.
version: '2.4'
services:
hobbyMinecraftServer:
image: timoreymann/mcsrvod:latest
restart: always
ports:
# map to default port
- 25565:3000
environment:
# Set some max memory args
- JAVA_OPTS=-Xms256M -Xmx1128M -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap
# we dont want a console in there
- SERVER_OPTS=nogui --noconsole
- KILL_INTERVAL=900
volumes:
# Mount the folder with the server.jar and stuff
- ./minecraft:/srv/mcsrvod
# we dont want to waste our servers resources ;)
mem_limit: 1200M
Content type
Image
Digest
Size
117.7 MB
Last updated
almost 7 years ago
docker pull timoreymann/mcsrvod