Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2864 Upgrade Dockerfile to use JDK 11 (#647)

Lewis John McGibbneycc8d76afe4f8
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 3077d1add..0f06894bb 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -13,21 +13,23 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-FROM ubuntu:18.04
+FROM alpine:3.13
MAINTAINER Apache Nutch Committers <[email protected]>
WORKDIR /root/
-
# Install dependencies
-RUN apt update
-RUN apt install -y ant git openjdk-8-jdk-headless
+RUN apk update
+RUN apk --no-cache add apache-ant bash git openjdk11
-# Set up JAVA_HOME
-RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64' >> $HOME/.bashrc
+RUN echo 'export JAVA_HOME=/usr/lib/jvm/java-11-openjdk' >> $HOME/.bashrc
# Checkout and build the Nutch master branch (1.x)
-RUN git clone https://github.com/apache/nutch.git nutch_source && cd nutch_source && ant runtime
+RUN git clone https://github.com/apache/nutch.git nutch_source && \
+ cd nutch_source && \
+ ant runtime && \
+ rm -rf build/ && \
+ rm -rf /root/.ivy2/
# Convenience symlink to Nutch runtime local
RUN ln -s nutch_source/runtime/local $HOME/nutch
diff --git a/docker/README.md b/docker/README.md
index 58a3b5ebc..2ac88cc0c 100644
--- a/docker/README.md
+++ b/docker/README.md
@@ -1,5 +1,12 @@
# Nutch Dockerfile #
+![Docker Pulls](https://img.shields.io/docker/pulls/apache/nutch?style=for-the-badge)
+![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/apache/nutch?style=for-the-badge)
+![Docker Image Version (latest semver)](https://img.shields.io/docker/v/apache/nutch?style=for-the-badge)
+![MicroBadger Layers](https://img.shields.io/microbadger/layers/apache/nutch?style=for-the-badge)
+![Docker Stars](https://img.shields.io/docker/stars/apache/nutch?style=for-the-badge)
+![Docker Automated build](https://img.shields.io/docker/automated/apache/nutch?style=for-the-badge)
+
Get up and running quickly with Nutch on Docker.
## What is Nutch?
@@ -18,7 +25,7 @@ Current configuration of this image consists of components:
## Base Image
-* [ubuntu:18.04](https://hub.docker.com/_/ubuntu/)
+* [alpine:3.13](https://hub.docker.com/_/alpine/)
## Tips