Skip to content
This repository was archived by the owner on Feb 20, 2020. It is now read-only.

Pavolab/minecraft

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minecraft

A docker image for minecraft server

MicroBadger Size Docker Automated build Docker Build Status GitHub Minecraft Version

Running the Container

First create a named data volume to hold the persistent world and config data:

docker volume create --name minecraft-data
docker run -d -p 25565:25565 -v minecraft-data:/etc/minecraft --name minecraft-server pavolab/minecraft

Optional 'docker run' Arguments

-e _JAVA_OPTIONS='-Xms256M -Xmx2048M' - Set JVM arguments for minimum/maximum memory consumption (default: '-Xms256M -Xmx2048M')

-e TZ=America/Phoenix - Set the timezone for your server. You can find your timezone in this list of timezones. Use the (case sensitive) value from the TZ column. If left unset, timezone will be UTC.

--restart unless-stopped - Always restart the container regardless of the exit status, but do not start it on daemon startup if the container has been put to a stopped state before. See the Docker restart policies for additional details.

NOTE: See the Minecraft Wiki for more info on memory requirements.

Editing the Server Config

Once you have a running container, you can edit the Minecraft server config with /opt/minecraft

After saving changes, restart your container with docker restart minecraft-server

However, I recommend that you upload to /opt/minecraft after the local editing is complete.

Adding OPs

Once you have a running server container you can add OPs by running:

docker exec minecraft-server ops [PLAYER_NAMES]

NOTE: Replace [PLAYER_NAMES] with the name of one or more players you wish to give OP privileges separated by a space. If a players name contains spaces wrap it in quotation marks.

Here's an example granting OP to three players with name's Marty, Jennifer and Doc Brown:

docker exec minecraft-server ops Marty Jennifer "Doc Brown"

Upgrading the Server

First pull down the latest image:

docker pull pavolab/minecraft

Remove your running server container:

docker rm -f minecraft-server

And run a new one with the same command/arguments as before.

About

A docker image for minecraft server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published