• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

overshard/docker-minecraft: An easy way to get a Minecraft server up and running ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

overshard/docker-minecraft

开源软件地址(OpenSource Url):

https://github.com/overshard/docker-minecraft

开源编程语言(OpenSource Language):

Shell 100.0%

开源软件介绍(OpenSource Introduction):

docker-minecraft

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.

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/overshard/docker-minecraft
cd docker-minecraft
sudo docker build -t overshard/minecraft .

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.

sudo docker run -d=true -p=25565:25565 -v=/mnt/minecraft:/data overshard/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 overshard/minecraft:latest.

sudo docker start <container_id>
sudo docker stop <container_id>

Notes on the run command

  • -v is the volume you are mounting -v=host_dir:docker_dir
  • overshard/minecraft is simply what I called my docker build of this image
  • -d=true allows this to run cleanly as a daemon, remove for debugging
  • -p is the port it connects to, -p=host_port:docker_port



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap