GithubHelp home page GithubHelp logo

docker-minecraft's Introduction

docker-minecraft

Docker Pull

A nice and easy way to get a Minecraft server up and running using docker. For help on getting started with docker see the official getting started guide. For more information on Minecraft and check out it's website.

Quickstart

To quickly get your container up and running execute on of the following commands

To run minecraft without volume mount, run:

docker run -d --name=mc -p 25565:25565 rlenferink/minecraft /start

To run minecraft with volume mount, run:

docker run -d --name=mc -p 25565:25565 -v /mnt/minecraft:/data rlenferink/minecraft /start

Running minecraft with volume mount is to save your world data.

Running docker-minecraft

Running the first time will set your port to a static port of your choice so that you can easily map a proxy to. If this is the only thing running on your system you can map the port to 25565 and no proxy is needed. i.e. -p 25565:25565 . If you want to enable the query protocol you need to add another -p 25565:25565/udp to forward the UDP protocol on the same port as well. Also be sure your mounted directory on your host machine is already created before running mkdir -p /mnt/minecraft.

docker run -d --name=mc -p 25565:25565 -v /mnt/minecraft:/data rlenferink/minecraft /start

From now on when you start/stop docker-minecraft you should use the container id with the following commands. To get your container id, after you initial run type sudo docker ps and it will show up on the left side followed by the image name which is rlenferink/minecraft:latest.

docker start <container_id>
docker stop <container_id>

Building docker-minecraft

Running this will build you a docker image with the latest version of both docker-minecraft and Minecraft itself.

git clone https://github.com/rlenferink/docker-minecraft
cd docker-minecraft
docker build -t rlenferink/minecraft .

Notes on the run command

  • -d allows this to run cleanly as a daemon, remove for debugging
  • -p is the port it connects to, -p host_port:docker_port
  • -v is the volume you are mounting -v host_dir:docker_dir
  • rlenferink/minecraft is how this docker image is called

docker-minecraft's People

Contributors

rlenferink avatar villematti avatar jarrodparkes avatar rsletta avatar

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.