From 84521eca53b8d45cad978d3c7ca280d00013b1f4 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Sat, 20 Sep 2014 15:54:23 -0500 Subject: [PATCH] [minecraft-server] General info about Docker port mappings and container naming --- .gitignore | 1 + minecraft-server/README.md | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9f11b755 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea/ diff --git a/minecraft-server/README.md b/minecraft-server/README.md index 8a25923b..cefdd7c7 100644 --- a/minecraft-server/README.md +++ b/minecraft-server/README.md @@ -4,7 +4,25 @@ To simply use the latest stable version, run docker run -d -p 25565:25565 itzg/minecraft-server -where the default server port, 25565, will be exposed on your host machine. +where the default server port, 25565, will be exposed on your host machine. If you want to serve up multiple +Minecraft servers or just use an alternate port, change the host-side port mapping such as + + docker run -p 25566:25565 ... + +will service port 25566. + +Speaking of multiple servers, it's handy to give your containers explicit names using `--name`, such as + + docker run -d -p 25565:25565 --name minecraft-vanilla itzg/minecraft-server + +With that you can easily view the logs, stop, or re-start the container: + + docker logs -f minecraft-vanilla + ( Ctrl-C to exit logs action ) + + docker stop minecraft-vanilla + + docker start minecraft-vanilla ## EULA Support