You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nutch.apache.org by le...@apache.org on 2021/06/03 20:15:51 UTC
[nutch] branch master updated: NUTCH-2864 Upgrade Dockerfile to use
JDK 11 (#647)
This is an automated email from the ASF dual-hosted git repository.
lewismc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nutch.git
The following commit(s) were added to refs/heads/master by this push:
new cc8d76a NUTCH-2864 Upgrade Dockerfile to use JDK 11 (#647)
cc8d76a is described below
commit cc8d76afe4f86691008b5673b182bb0e54a59710
Author: Lewis John McGibbney <le...@gmail.com>
AuthorDate: Thu Jun 3 13:15:03 2021 -0700
NUTCH-2864 Upgrade Dockerfile to use JDK 11 (#647)
* NUTCH-2864 Upgrade Dockerfile to use JDK 11
---
docker/Dockerfile | 16 +++++++++-------
docker/README.md | 9 ++++++++-
2 files changed, 17 insertions(+), 8 deletions(-)
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 3077d1a..0f06894 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 <de...@nutch.apache.org>
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 58a3b5e..2ac88cc 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