Running Minecraft in a Docker container


If you ever want to run a minecraft server, but you don’t want to add all the Java and minecraft files directly to your servers filesystem, you can use the following Dockerfile:

FROM google/debian:wheezy
RUN apt-get -y update
RUN apt-get -y install openjdk-7-jre-headless wget
RUN wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar
EXPOSE 25565
RUN echo eula=true > eula.txt
CMD ["java", "-jar", "minecraft_server.1.8.jar"]

You can then build a Docker container with the following command:

sudo docker build .

After that, you have a Minecraft 1.8 server running and you can connect to 127.0.0.1:25565 with your Minecraft client. Enjoy!

Weitere Artikel

Gronkh ist jetzt ein Rundfunksender...

Crossfit Regionals 2018 in Berlin

Crossfit Open 2018

Qutebrowser userscript for TT-RSS

Aufbau eines Hackintosh

Enable request logging in Jetty 9.1

Hacktoberfest 2017

Automatische Erneuerung von Lets Encrypt Zertifikaten

Neue Antennen für meine Fritzbox

Fitness vs Gesundheit