
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Verify the image.
shdocker run -d -p 5000:80 hikriss/mysite
Then, use Chrome/IE/Firefox to browse to 'http://localhost:5000'
To share local folder with friends.
shdocker run -d -p <port_exposed>:80 -v <local folder>:/var/www hikriss/mysite
Note: Docker for Windows uses absolute local path.
shdocker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 25e2ed982bcb hikriss/mysite:release-1.0 "/usr/local/bin/run" 9 minutes ago Up 9 minutes 0.0.0.0:5000->80/tcp wonderful_swanson
shdocker stop <container id from docker ps>
shdocker image ls REPOSITORY TAG IMAGE ID CREATED SIZE hikriss/mysite release-1.0 d2b9efa89c53 15 minutes ago 258MB hikriss/mysite latest a1ea6d09721c About an hour ago 258MB d4w/nsenter latest 9e4f13a0901e 10 months ago 83.8kB
shdocker rm <container id from docker ps>
shdocker-compose up
this is a docker-compose.yml
shversion: "3" services: web: # replace username/repo:tag with your name and image details image: hikriss/mysite:latest ports: - "5000:80" volumes: - .:/var/www
shdocker-compose down Stopping trainning_web_1 ... done Removing trainning_web_1 ... done Removing network trainning_default
the command below will create the SWarm manager node and also print how to join to this cluster on stdout.
shdocker swarm init Swarm initialized: current node (biquah13xnljg90b738mxv15q) is now a manager. To add a worker to this swarm, run the following command: docker swarm join --token SWMTKN-1-0msistoyg1zsskn3divyrifh3i3ay8cgkw21msgknkpa6gvfse-e0bxcqztb2tzmj53itq97jlp2 192.168.65.2:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
use output from create Swarm
shdocker node ls ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS biquah13xnljg90b738mxv15q * moby Ready Active Leader
This cluster has only 1 machine for simplicity. the docker-compose-swarm has 2 web servers.
shdocker stack deploy -c docker-compose-swarm.yml mycluster Creating network mycluster_webnet Creating service mycluster_visualizer Creating service mycluster_web
using chrome to browse to 'http://localhost:5000' to see the output of apache server
shhikriss@Kriss-I7:~$ curl localhost:5000 6e5b6145244a hikriss@Kriss-I7:~$ curl localhost:5000 27378d55c164 hikriss@Kriss-I7:~$ curl localhost:5000 6e5b6145244a hikriss@Kriss-I7:~$ curl localhost:5000 27378d55c164
using chrome to browse to 'http://localhost:8080' to see the output of visualizer
use the same command with deploy above. Swarm will be check and update only neccesary change
shdocker stack ps mycluster ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR PORTS jzjrezyfxlcc mycluster_web.1 hikriss/mysite:latest moby Running Running 7 minutes ago r9ci79k6bewg mycluster_visualizer.1 dockersamples/visualizer:stable moby Running Running 6 minutes ago m2kzrcdsenpf mycluster_web.2 hikriss/mysite:latest moby Running Running 7 minutes ago
shdocker stack rm mycluster Removing service mycluster_web Removing service mycluster_visualizer Removing network mycluster_webnet
Worker node
shdocker swarm leave
Manager node
shdocker swarm leave --force
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务