
如果你使用 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://travis-ci.org/FireFart/gochro.svg?branch=master](https://travis-ci.org/FireFart/gochro)
gochro is a small docker image with chromium installed and a golang based webserver to interact wit it. It can be used to take screenshots of websites using chromium-headless and convert HTML pages to PDF.
If errors occur the error will be logged to stdout and a non information leaking error message is presented to the user.
This project is currently used on [***] for taking website screenshots and to generate PDF reports.
This URL takes a Screenshot of [***] with a resolution of 1024x768 and returns an image.
http://localhost:8080/screenshot?url=https://firefart.at&w=1024&h=768
Send a POST request with the HTML you want to convert in the Post body to the following url.
http://localhost:8080/html2pdf?w=1024&h=768
This will return a PDF of the HTML input.
Example:
textPOST /html2pdf?w=1024&h=768 HTTP/1.1 Host: localhost:8000 Content-Type: application/x-www-form-urlencoded Content-Length: 119 <html> <head><title>Test Page</title></head> <body> <h1>This is a test</h1> <p>This is a test</p> </body> </html>
To run this image you should use the https://github.com/jessfraz/dotfiles/blob/master/etc/docker/seccomp/chrome.json provided by https://github.com/jessfraz. The privileges on the host are needed for chromiums internal security sandbox. You can also deactivate the sandbox on chromium (would require changes in main.go) but that's a bad idea and puts your server at risk, so please use the seccomp profile instead.
I included all the necessary steps in the included Makefile to build and run everything. Be sure to use the --init switch to get rid of zombie processes of chromium.
text-host The host and port to listen of (refers to inside the container). Defaults to 0.0.0.0:8000 -debug Enables debug output. Default: false -ignore-cert-errors Also fetch ressources from origins with untrusted certificates or cert errors. -proxy Use a proxy server to connect to the internet. Please use format IP:PORT without a protocol. Example: 1.2.3.4:3128
The following command builds the webserver for non docker use inside the build directory
bashmake all
To only build the docker image run
bashmake docker-update
This will download the seccomp profile, all needed base images and builds the gochro:dev tagged image.
To run the image in interactive mode (docker output will be connected to current terminal) run
bashmake docker-run
This will also build the image before running it. This maps the internal port 8000 to your machine.
To run it in deamon mode use the following command. This will launch everything in the background. Be aware that the webserver is rerun on startup of the machine if you don't shut down the container manually.
bashmake docker-run-daemon
You can also use the https://hub.docker.com/r/firefart/gochro from dockerhub.
To pull the image run
bashdocker pull firefart/gochro
If you want to include this image in a docker-compose file you can use the following example. Just connect the gochronet to the other service so the containers can communicate with each other.
Please note that the 0.0.0.0 in the command only applies to the network inside the docker container itself. If you want to access it from your local machine you need to add a port mapping.
ymlversion: '3.7' services: gochro: image: firefart/gochro init: true container_name: gochro security_opt: - seccomp="chrome.json" command: -host 0.0.0.0:8000 networks: - gochronet networks: gochronet: driver: bridge
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务