Git Product home page Git Product logo

minecraft-docker's Introduction

Docker containers for Minecraft

I set these up to make it easier to build gnembon's CarpetMod. The Dockerfile for vanilla Minecraft is based on PHLAK's docker-minecraft project, with some improvements (such as server jar URL lookup from human-readable version id).

I won't link to the repositories of the prebuilt images because (as I understand it) distributing Docker images with the Minecraft jar bundled in to them is against the EULA, but I've included cloudbuild.yaml files so that you can build them with Google Cloud Build if you wish (or see how one might run docker build locally).

Also, at some point Mojang changed the server jar downloads from mojang.com/HUMAN_READABLE_VERSION-server.jar to mojang.com/UNREADABLE_BLOB_ID-server.jar, so I created a script to automate the translations (versions are sourced from mcversions.net).

Running the server

The only one-time setup you need to do is create a docker volume to store the world data:

docker volume create --name minecraft-data

To run the Minecraft server:

GCP_PROJECT_ID=your-project-id
MC_VERSION=1.12.2
SERVER_TYPE=vanilla # or carpet
docker run -it -d -p 25565:25565 -v minecraft-data:/etc/minecraft --name minecraft-server gcr.io/${GCP_PROJECT_ID}/minecraft-${SERVER_TYPE}:${MC_VERSION}

License & Copyright

Code is licensed under the MIT license.

The vanilla/Dockerfile is based on PHLAK's. See his license for usage info.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.