mikewalch closed pull request #7: Dockerfile updates
URL: https://github.com/apache/accumulo-docker/pull/7
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to