
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
Docker container for https://github.com/hack-chat/main
docker run -d --name hchat \ -p 8080:8080 \ -p 6060:6060 \ -e WSPROTOCOL="ws://" \ -e WSPORT="6060" \ -e WSBASEURL="" \ -e ADMIN_NAME="boop" \ -e PASSWORD="pass" \ -e SALT="2dSg4kS" \ mcgriddle/hack-chat:latest
-p 8080:8080 - the port the server listens on-p 6060:6060 - the port the client listens on-e WSPROTOCOL - websocket protocol that the client will use to contact the server. "ws://" or "wss://"-e WSPORT - websocket port that the client will use to contact the server. cannot be blank.-e WSBASEURL - base url used for reverse proxy setups. needs to have leading forward slash.-e ADMIN_NAME - cannot be blank-e PASSWORD - cannot be blank-e SALT - cannot be blankAccess it on 0.0.0.0:8080
docker run -d --name hchat \ -p 8080:8080 \ -p 6060:6060 \ -e WSPROTOCOL="ws://" \ -e WSPORT="6060" \ -e WSBASEURL="" \ -e ADMIN_NAME="boop" \ -e PASSWORD="pass" \ -e SALT="2dSg4kS" \ mcgriddle/hack-chat:latest
If you want to use ssl, you'll need nginx or similar sitting in front of it and proxying to hack-chat.
Say you wanted to access the client at https://<some_domain>/hacker-chat-thingy with an encrypted websocket at https://<some_domain>/bleepblippitybleepbloop .
Purposely not specifying the hacker-chat ports here as nginx link to it.
docker run -d --name hchat \ -e WSPROTOCOL="wss://" \ -e WSPORT="443" \ -e WSBASEURL="/bleepblippitybleepbloop" \ -e ADMIN_NAME="boop" \ -e PASSWORD="pass" \ -e SALT="2dSg4kS" \ mcgriddle/hack-chat:latest
Create nginx directory so you can easily modify the conf file. Then you'll want to have some user own that directory.
sudo mkdir -p /opt/docker-web sudo groupadd --gid 1002 dockeruser sudo adduser --no-create-home --system --disabled-login --gid 1002 --uid 121 dockeruser sudo chown dockeruser:dockeruser /opt/docker-web
Start an nginx container. This particular one has self-signed certs already setup. The PUID and PGID need to match whatever group and user was created above, or another user.
sudo docker run --name web -p 443:443 --link hchat:hchat -v /opt/docker-web:/config -e PUID=121 -e PGID=1002 -e DH_SIZE=2048 -e TZ=America/New_York mcgriddle/nginx-self-cert
Kill the container when you see 'Server Ready'
Now modify the nginx conf in /opt/docker-web/nginx/site-confs/default to look like this
upstream websocket { server hchat:6060; } # main server block server { listen 443 ssl default_server; root /config/www; index index.html index.htm index.php; server_name _; # all ssl related config moved to ssl.conf include /config/nginx/ssl.conf; client_max_body_size 0; location / { try_files $uri $uri/ /index.html /index.php?$args =404; } location /hacker-chat-thingy/ { # https://github.com/McGriddle/docker-nginx-self-cert/blob/master/root/defaults/proxy.conf include /config/nginx/proxy.conf; rewrite /reqs(.*) /$1 break; proxy_pass http://hchat:8080/; } location /bleepblippitybleepbloop { rewrite ^/bleepblippitybleepbloop / break; proxy_pass http://websocket; proxy_http_version 1.1; proxy_set_header Upgrade websocket; proxy_set_header Connection upgrade; } }
sudo docker start web
You should be able to access hchat now on https://<your_ip>/hacker-chat-thingy/
!hack-chat-main
!hack-chat
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务