You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by mw...@apache.org on 2019/01/04 21:25:53 UTC
[accumulo-docker] branch master updated: Dockerfile updates (#7)
This is an automated email from the ASF dual-hosted git repository.
mwalch pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/accumulo-docker.git
The following commit(s) were added to refs/heads/master by this push:
new f0a1fa7 Dockerfile updates (#7)
f0a1fa7 is described below
commit f0a1fa76a037e89ec5974a6374d536f825e22af1
Author: Mike Walch <mw...@apache.org>
AuthorDate: Fri Jan 4 16:25:49 2019 -0500
Dockerfile updates (#7)
* Simplified arguments
* Allow building images using provided Accumulo tarball
---
Dockerfile | 23 ++++++++++++++---------
README.md | 6 +++++-
2 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/Dockerfile b/Dockerfile
index 98bba83..551046a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -18,14 +18,13 @@ FROM centos:7
RUN yum install -y java-1.8.0-openjdk-devel make gcc-c++ wget
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk
-ARG HADOOP_VERSION
-ARG HADOOP_USER_NAME
-ARG ZOOKEEPER_VERSION
+ARG ACCUMULO_VERSION=2.0.0-alpha-1
+ARG HADOOP_VERSION=3.1.1
+ARG ZOOKEEPER_VERSION=3.4.13
+ARG HADOOP_USER_NAME=accumulo
+ARG ACCUMULO_FILE=
-ENV HADOOP_VERSION ${HADOOP_VERSION:-3.1.1}
-ENV HADOOP_USER_NAME ${HADOOP_USER_NAME:-accumulo}
-ENV ZOOKEEPER_VERSION ${ZOOKEEPER_VERSION:-3.4.13}
-ENV ACCUMULO_VERSION 2.0.0-alpha-1
+ENV HADOOP_USER_NAME $HADOOP_USER_NAME
ENV APACHE_DIST_URLS \
https://www.apache.org/dyn/closer.cgi?action=download&filename= \
@@ -34,6 +33,8 @@ ENV APACHE_DIST_URLS \
https://www.apache.org/dist/ \
https://archive.apache.org/dist/
+COPY README.md $ACCUMULO_FILE /tmp/
+
RUN set -eux; \
download() { \
local f="$1"; shift; \
@@ -49,9 +50,13 @@ RUN set -eux; \
[ -n "$success" ]; \
}; \
\
- download "accumulo.tar.gz" "accumulo/$ACCUMULO_VERSION/accumulo-$ACCUMULO_VERSION-bin.tar.gz"; \
download "hadoop.tar.gz" "hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz"; \
- download "zookeeper.tar.gz" "zookeeper/zookeeper-$ZOOKEEPER_VERSION/zookeeper-$ZOOKEEPER_VERSION.tar.gz"
+ download "zookeeper.tar.gz" "zookeeper/zookeeper-$ZOOKEEPER_VERSION/zookeeper-$ZOOKEEPER_VERSION.tar.gz"; \
+ if [ -z "$ACCUMULO_FILE" ]; then \
+ download "accumulo.tar.gz" "accumulo/$ACCUMULO_VERSION/accumulo-$ACCUMULO_VERSION-bin.tar.gz"; \
+ else \
+ cp "/tmp/$ACCUMULO_FILE" "accumulo.tar.gz"; \
+ fi
RUN tar xzf accumulo.tar.gz -C /tmp/
RUN tar xzf hadoop.tar.gz -C /tmp/
diff --git a/README.md b/README.md
index 7b0be22..9d34287 100644
--- a/README.md
+++ b/README.md
@@ -33,10 +33,14 @@ building an image:
cd /path/to/accumulo-docker
docker build -t accumulo .
- Or build the Accumulo docker image with specific versions of Hadoop, Zookeeper, etc using the command below:
+ Or build the Accumulo docker image with specific released versions of Hadoop, Zookeeper, etc that will downloaded from Apache using the command below:
docker build --build-arg ZOOKEEPER_VERSION=3.4.8 --build-arg HADOOP_VERSION=2.7.0 -t accumulo .
+ Or build with an Accumulo tarball (located in same directory as DockerFile) using the command below:
+
+ docker build --build-arg ACCUMULO_VERSION=2.0.0-SNAPSHOT --build-arg ACCUMULO_FILE=accumulo-2.0.0-SNAPSHOT-bin.tar.gz -t accumulo .
+
## Image basics
The entrypoint for the Accumulo docker image is the `accumulo` script. While the primary use