本站面向开发者与科研用户,提供开源镜像的搜索和下载加速服务。
所有镜像均来源于原始开源仓库,本站不存储、不修改、不传播任何镜像内容。

nutch Docker 镜像下载 - 轩辕镜像

nutch 镜像详细信息和使用指南

nutch 镜像标签列表和版本信息

nutch 镜像拉取命令和加速下载

nutch 镜像使用说明和配置指南

Docker 镜像加速服务 - 轩辕镜像平台

国内开发者首选的 Docker 镜像加速平台

极速拉取 Docker 镜像服务

相关 Docker 镜像推荐

热门 Docker 镜像下载

nutch
apache/nutch
自动构建

nutch 镜像详细信息

nutch 镜像标签列表

nutch 镜像使用说明

nutch 镜像拉取命令

Docker 镜像加速服务

轩辕镜像平台优势

镜像下载指南

相关 Docker 镜像推荐

Apache Nutch是高度可扩展的开源网络爬虫软件项目,支持单机运行和Hadoop集群部署,提供三种构建模式,可快速搭建包含REST服务器和Web应用的网络爬虫服务。
29 收藏0 次下载activeapache镜像

nutch 镜像详细说明

nutch 使用指南

nutch 配置说明

nutch 官方文档

Nutch Dockerfile

!Docker Pulls !Docker Image Size (latest by date) !Docker Image Version (latest semver) !Docker Stars !Docker Automated build

快速使用Docker搭建Nutch服务。

什么是Nutch?

!Nutch logo

Apache Nutch是一个高度可扩展、可伸缩的开源网络爬虫软件项目。

Nutch可以在单机上运行,但在Hadoop集群中运行时能充分发挥其优势。

Docker镜像

当前镜像配置包含以下组件:

  • Nutch 1.x("master"分支)

基础镜像

  • alpine:3.19

提示

如果遇到类似以下错误,可能需要将docker命令别名设置为"docker --tls":

2015/04/07 09:19:56 Post [***] malformed HTTP response "\x15\x03\x01\x00\x02\x02\x16"

最简单的方法:

  1. alias docker="docker --tls"

安装

  1. 安装Docker。

  2. 从当前目录的文件构建:

有三种构建模式,可通过--build-arg BUILD_MODE=0标志激活。以下为默认值:

  • 0 == 安装Nutch master分支源码,crawlnutch脚本位于$PATH
  • 1 == 与模式0相同,额外添加Nutch REST服务器;额外构建参数--build-arg SERVER_PORT=8081--build-arg SERVER_HOST=0.0.0.0
  • 2 == 与模式1相同,额外添加Nutch Web应用;额外构建参数--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:

bash
boot2docker up
$(boot2docker shellinit | grep export)

运行容器:

bash
docker run -t -i -d -p 8080:8080 -p 8081:8081 --name nutchcontainer apache/nutch
c5401810e50a606f43256b4b24602443508bd9badcf2b7493bd97839834571fc

查看容器日志:

bash
docker 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交互,例如:

bash
curl http://localhost:8080/admin
{"startDate":1625118207995,"configuration":["default"],"jobs":[],"runningJobs":[]}

进入容器:

bash
docker exec -it c5401810e50a606f43256b4b24602443508bd9badcf2b7493bd97839834571fc /bin/bash

查看supervisord日志:

bash
cat /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子进程日志:

bash
ls /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教程。

用户好评

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

oldzhang的头像

oldzhang

运维工程师

Linux服务器

5

"Docker加速体验非常流畅,大镜像也能快速完成下载。"