Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
..
Failed to load latest commit information.
README.md

README.md

#Minecraft, Docker, Compute Engine: an interlude

This repository accompanies the Minecraft, Docker, Compute Engine: an interlude blog entry, published on $DAY August 2015. It builds upon the prior entries in the series, which covers building, running, and maintaining the Minecraft server container. Please follow along in the blog entry, as it provides context and explanation for this repository's contents. Files and commands may require updating as future versions of docker and gcloud are released.

Customizing the server.properties

Look at the server.properties file on minecraft-server:

minecraft-server $ sudo docker exec -ti <container name> /bin/bash

root@baea2dfbd18f:/opt/ftb# more server.properties
#Minecraft server properties
< snip! >
server-port=25565
level-type=DEFAULT
enable-rcon=false
level-seed=
force-gamemode=false
server-ip=
max-build-height=256
spawn-npcs=true
white-list=false
spawn-animals=true
hardcore=false
snooper-enabled=true
online-mode=true
resource-pack=
pvp=true     
difficulty=1 
< snip! >

Modify the file inside the container:

root@baea2dfbd18f:/opt/ftb# echo "<full modified content of server.properties>" > server.properties

Exit the container and commit the changes to the image:

root@baea2dfbd18f:/opt/ftb# exit
minecraft-server $ sudo docker commit -m "customized the server.properties" \
                                -a "Jane Doe" \
                                <container id> <docker user>/ftb:v2

Verify that the image has been updated:

minecraft-server $ sudo docker images
REPOSITORY    TAG IMAGE ID  CREATED   VIRTUAL SIZE
<docker user>/ftb v2  9ead6660604b  7 seconds ago 1.013 GB

Push the changes to Google Container Registry:

minecraft-server $ sudo docker tag <docker user>/ftb:v2 gcr.io/<project id>/ftb-v2
minecraft-server $ sudo gcloud docker push gcr.io/<project id>/ftb-v2