Why I Love Docker: A Use Case in Minecraft

https://www.reddit.com/r/Minecraft/comments/jjnho/so_i_uh_built_a_whalehouse/

Most Tuesdays, my friend, Daniel runs a Twitch stream where he plays some video games — I tend to tag along. We have had a casual Minecraft live series for a few months in which we play a regular vanilla survival map. We have been using Minecraft Realms as it is a no-hassle way to have a persistent co-op server. However, the other day, we decided we wanted to do a content series using Minecraft’s “hardcore” setting which prevents you from respawning after you die. For some reason, hardcore mode is not available on Minecraft Realms. Additionally, hardcore mode is not available when opening your local client to the LAN network.

Thus, we needed to create our own server. Being a developer, I have a well-used account with Digital Ocean and thus, would usually just spin up a bare Ubuntu machine and install and configure Minecraft myself via command line. However, Docker has been my forte these days…

Thankfully, Kitematic has an out-of-the-box Minecraft image. My friend Daniel was about to cancel the Minecraft session since we didn’t have time to configure our own server, but I told him to give me a moment…

Behold the power of Docker…

This is precisely why I love Docker: it makes it so easy to use community created resources to start and run services without installing them on your computer. Instead, they only exist within easily disposable containers. On top of that, it usually takes only one to two commands to have something up and running.

Since I needed to edit the Minecraft server’s settings in this example, I built my own image that can handle configurable settings.

If you are not savvy with command line, thankfully, Kitematic has a nice GUI…

Kitematic puts the benefits of Docker in the hands of non-programmers

So that’s it! You can easily setup your own configurable Minecraft server that can be deleted at any time with no impact to your machine. No worrying about .jar files, text editors, etc.

If you want a tutorial, check out this guy’s post on the subject:

Have questions or a particular post you’d like a write-up on? Hit me up on twitter!

Check out my post on my most used Docker commands.