
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
!https://github.com/docker/dockercraft/raw/master/docs/img/logo.png?raw=true
A simple Minecraft Docker client, to visualize and manage Docker containers.
!https://github.com/docker/dockercraft/raw/master/docs/img/dockercraft.gif?raw=true
*** video
WARNING: Please use Dockercraft on your local machine only. It currently doesn't support authentication. Every player should be ***ed a root user!
Install Minecraft: minecraft.net
The Minecraft client hasn't been modified, just get the official release.
Pull or build Dockercraft image: (an official image will be available soon)
docker pull gaetan/dockercraft
or
git clone git@github.com:docker/dockercraft.git docker build -t gaetan/dockercraft dockercraft
Run Dockercraft container:
docker run -t -i -d -p 25565:25565 \ -v /var/run/docker.sock:/var/run/docker.sock \ --name dockercraft \ gaetan/dockercraft
Mounting /var/run/docker.sock inside the container is necessary to send requests to the Docker remote API.
The default port for a Minecraft server is 25565, if you prefer a different one: -p <port>:25565
Open Minecraft > Multiplayer > Add Server
The server address is the IP of Docker host. No need to specify a port if you used the default one.
If you're using Docker Machine: docker-machine ip <machine_name>
Join Server!
You should see at least one container in your world, which is the one hosting your Dockercraft server.
You can start, stop and remove containers interacting with levers and buttons. Some Docker commands are also supported directly via Minecraft's chat window, which is displayed by pressing the T key (default) or / key.
A command always starts with a
/.If you open the prompt using the
/key, it will be prefilled with a/character, but if you open it with theTkey, it will not be prefilled and you will have to type a/yourself before typing your docker command.example:
/docker run redis.
!https://github.com/docker/dockercraft/raw/master/docs/img/landscape.png?raw=true
Do you find the plains too plain? If so, you are in luck!
Dockercraft can be customised to use any of the https://github.com/cuberite/cuberite/blob/7f8a4eb7264a12ca2035b4e4d412485e01f309d4/src/BiomeDef.cpp#L17 and https://github.com/cuberite/cuberite/blob/7f8a4eb7264a12ca2035b4e4d412485e01f309d4/src/Generating/ComposableGenerator.cpp#L299 supported by Cuberite!
You can pass these additional arguments to your docker run command:
docker run -t -i -d -p 25565:25565 \ -v /var/run/docker.sock:/var/run/docker.sock \ --name dockercraft \ gaetan/dockercraft <biome> <groundlevel> <sealevel> <finishers>
Here are some examples:
Do you long for the calm of the oceans? !https://github.com/docker/dockercraft/raw/master/docs/img/ocean.png?raw=true
Try Ocean 50 63, or for a more frozen alternative, FrozenOcean 50 63 Ice
Or perhaps the heat of the desert? !https://github.com/docker/dockercraft/raw/master/docs/img/desert.png?raw=true
Then Desert 63 0 DeadBushes is what you need
Are you pining for the... Pines?
!https://github.com/docker/dockercraft/raw/master/docs/img/forest.png?raw=true
We have you covered. Try Forest 63 0 Trees
Or maybe you are looking for fun and games?
!https://github.com/docker/dockercraft/raw/master/docs/img/jungle.png?raw=true
If so, Welcome to the Jungle. Jungle 63 0 Trees
This is just the beginning for Dockercraft! We should be able to support a lot more Docker features like:
If you're interested about Dockercraft's design, discussions happen in https://github.com/docker/dockercraft/issues/19. Also, we're using https://ephtracy.github.io/ to do these nice prototypes:
!https://github.com/docker/dockercraft/raw/master/docs/img/voxelproto.jpg?raw=true
You can find our Magicavoxel patterns in .
To get fresh news, follow our *** account: @dockercraft.
The Minecraft client itself remains unmodified. All operations are done server side.
The Minecraft server we use is [***] A custom Minecraft compatible game server written in C++. https://github.com/cuberite/cuberite
This server accepts plugins, scripts written in Lua. So we did one for Docker. (world/Plugins/Docker)
Unfortunately, there's no nice API to communicate with these plugins. But there's a webadmin, and plugins can be responsible for "webtabs".
luaPlugin:AddWebTab("Docker",HandleRequest_Docker)
Basically it means the plugin can catch POST requests sent to http://127.0.0.1:8080/webadmin/Docker/Docker.
Events from the Docker remote API are transmitted to the Lua plugin by a small daemon (written in Go). (go/src/goproxy)
gofunc MCServerRequest(data url.Values, client *http.Client) { req, _ := http.NewRequest("POST", "http://127.0.0.1:8080/webadmin/Docker/Docker", strings.NewReader(data.Encode())) req.Header.Set("Content-Type", "application/x-www-form-urlencoded") req.SetBasicAuth("admin", "admin") client.Do(req) }
The goproxy binary can also be executed with parameters from the Lua plugin, to send requests to the daemon:
luafunction PlayerJoined(Player) -- refresh containers r = os.execute("goproxy containers") end
Want to hack on Dockercraft? https://github.com/docker/docker/blob/master/CONTRIBUTING.md apply.
!https://github.com/docker/dockercraft/raw/master/docs/img/contribute.png?raw=true
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务