如果你使用 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 Pulls !Docker Image Size (latest by date) !Docker Image Version (latest semver) !Docker Stars !Docker Automated build
快速使用Docker搭建Nutch服务。
!Nutch logo
Apache Nutch是一个高度可扩展、可伸缩的开源网络爬虫软件项目。
Nutch可以在单机上运行,但在Hadoop集群中运行时能充分发挥其优势。
当前镜像配置包含以下组件:
如果遇到类似以下错误,可能需要将docker命令别名设置为"docker --tls":
2015/04/07 09:19:56 Post http://192.168.59.103:2376/v1.14/containers/create?name=NutchContainer: malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"
最简单的方法:
alias docker="docker --tls"安装Docker。
从当前目录的文件构建:
有三种构建模式,可通过--build-arg BUILD_MODE=0标志激活。以下为默认值:
crawl和nutch脚本位于$PATH中--build-arg SERVER_PORT=8081和--build-arg SERVER_HOST=0.0.0.0--build-arg WEBAPP_PORT=8080例如,如果要安装Nutch master分支并同时运行Nutch REST服务器和Web应用,运行以下命令:
bash$(boot2docker shellinit | grep export) #可能不需要 docker build -t apache/nutch . --build-arg BUILD_MODE=2 --build-arg SERVER_PORT=8081 --build-arg SERVER_HOST=0.0.0.0 --build-arg WEBAPP_PORT=8080
如果尚未运行Docker,启动Docker:
bashboot2docker up $(boot2docker shellinit | grep export)
运行容器:
bashdocker run -t -i -d -p 8080:8080 -p 8081:8081 --name nutchcontainer apache/nutch c5401810e50a606f43256b4b24602443508bd9badcf2b7493bd97839834571fc
查看容器日志:
bashdocker logs c5401810e50a606f43256b4b24602443508bd9badcf2b7493bd97839834571fc 2021-06-29 19:14:32,922 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2021-06-29 19:14:32,925 INFO supervisord started with pid 1 2021-06-29 19:14:33,929 INFO spawned: 'nutchserver' with pid 8 2021-06-29 19:14:33,932 INFO spawned: 'nutchwebapp' with pid 9 2021-06-29 19:14:36,012 INFO success: nutchserver entered RUNNING state, process has stayed up for > than 2 seconds (startsecs) 2021-06-29 19:14:36,012 INFO success: nutchwebapp entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
现在可以通过http://localhost:8080访问Web应用,并与REST API交互,例如:
bashcurl http://localhost:8080/admin {"startDate":1625118207995,"configuration":["default"],"jobs":[],"runningJobs":[]}
进入容器:
bashdocker exec -it c5401810e50a606f43256b4b24602443508bd9badcf2b7493bd97839834571fc /bin/bash
查看supervisord日志:
bashcat /tmp/supervisord.log 2021-06-29 19:14:32,922 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2021-06-29 19:14:32,925 INFO supervisord started with pid 1 2021-06-29 19:14:33,929 INFO spawned: 'nutchserver' with pid 8 2021-06-29 19:14:33,932 INFO spawned: 'nutchwebapp' with pid 9 2021-06-29 19:14:36,012 INFO success: nutchserver entered RUNNING state, process has stayed up for > than 2 seconds (startsecs) 2021-06-29 19:14:36,012 INFO success: nutchwebapp entered RUNNING state, process has stayed up for > than 2 seconds (startsecs)
查看supervisord子进程日志:
bashls /var/log/supervisord/ nutchserver_stderr.log nutchserver_stdout.log nutchwebapp_stderr.log nutchwebapp_stdout.log
Nutch位于$NUTCH_HOME,几乎可以运行。
需要设置种子URL,并在$NUTCH_HOME/conf/nutch-site.xml中更新http.agent.name配置属性,设置爬虫的代理名称。
有关更多“入门”信息,请查看Nutch教程。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

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