
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
. --port=25565 The port bound to listen for Minecraft client connections --api-binding=API-BINDING The host:port bound for servicing API requests --mapping=MAPPING,MAPPING Where MAPPING is externalHostname=host:port
GET /routes
Retrieves the currently configured routesPOST /routes
Registers a route given a JSON body structured like:json{ "serverAddress": "CLIENT REQUESTED SERVER ADDRESS", "backend": "HOST:PORT" }
POST /defaultRoute
Registers a default route to the given backend. JSON body is structured as:json{ "backend": "HOST:PORT" }
DELETE /routes/{serverAddress}
Deletes an existing route for the given serverAddressThe following diagram shows how https://github.com/itzg/mc-router/blob/master/docs/docker-compose.yml
configures two Minecraft server services named vanilla and forge, which also become the internal
network aliases. Notice those services don't need their ports exposed since the internal
networking allows for the inter-container access.
The router service is only one of the services that needs to exposed on the external
network. The --mapping declares how the hostname users will enter into their Minecraft client
will map to the internal services.
To test out this example, I added these two entries to my "hosts" file:
127.0.0.1 vanilla.example.com 127.0.0.1 forge.example.com
When running mc-router as a kubernetes pod and you pass the --in-kube-cluster command-line argument, then
it will automatically watch for any services annotated with
mc-router.itzg.me/externalServerName : The value of the annotation will be registered as the external hostname Minecraft clients would used to connect to the
routed service. The service's clusterIP and target port are used as the routed backend.mc-router.itzg.me/defaultServer : The service's clusterIP and target port are used as the default if
no other externalServiceName annotations applies.For example, start mc-router's container spec with
yamlimage: itzg/mc-router name: mc-router args: ["--in-kube-cluster"]
and configure the backend minecraft server's service with the annotation:
yamlapiVersion: v1 kind: Service metadata: name: mc-forge annotations: "mc-router.itzg.me/externalServerName": "external.host.name"
https://github.com/itzg/mc-router/blob/master/docs/k8s-example-auto.yaml
mc-router service that exposes a node port 25565--in-kube-cluster in the mc-router container arguments"mc-router.itzg.me/externalServerName" annotation that declares their external server namebashkubectl apply -f https://raw.githubusercontent.com/itzg/mc-router/master/docs/k8s-example-auto.yaml
Notes
mc-stable and mc-snapshot--service-node-port-range=25000-32767
to /etc/kubernetes/manifests/kube-apiserver.yaml以下是 itzg/mc-router 相关的常用 Docker 镜像,适用于 不同场景 等不同场景:
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

来自真实用户的反馈,见证轩辕镜像的优质服务