You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2017/10/31 14:01:35 UTC

[GitHub] roadmapper commented on a change in pull request #1: ACCUMULO-4706 Initial implementation of Accumulo docker image

roadmapper commented on a change in pull request #1: ACCUMULO-4706 Initial implementation of Accumulo docker image
URL: https://github.com/apache/accumulo-docker/pull/1#discussion_r148004267
 
 

 ##########
 File path: Dockerfile
 ##########
 @@ -0,0 +1,52 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+FROM centos:7
+
+RUN yum install -y java-1.8.0-openjdk-devel make gcc-c++
+ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk
+
+ARG HADOOP_VERSION
+ARG HADOOP_USER_NAME
+ARG ZOOKEEPER_VERSION
+
+ENV HADOOP_VERSION ${HADOOP_VERSION:-2.7.3}
+ENV HADOOP_USER_NAME ${HADOOP_USER_NAME:-accumulo}
+ENV ZOOKEEPER_VERSION ${ZOOKEEPER_VERSION:-3.4.9}
+ENV ACCUMULO_VERSION 2.0.0-SNAPSHOT
+
+RUN curl -sL http://archive.apache.org/dist/hadoop/core/hadoop-$HADOOP_VERSION/hadoop-$HADOOP_VERSION.tar.gz | tar -xzC /tmp
 
 Review comment:
   Might want to do this the way the [httpd](https://github.com/docker-library/httpd/blob/master/2.4/alpine/Dockerfile#L65) or [Tomcat](https://github.com/docker-library/tomcat/blob/master/8.5/jre8-alpine/Dockerfile#L49) Docker images do this:
   ```dockerfile
   ENV APACHE_DIST_URLS \
   # https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394
   	https://www.apache.org/dyn/closer.cgi?action=download&filename= \
   # if the version is outdated (or we're grabbing the .asc file), we might have to pull from the dist/archive :/
   	https://www-us.apache.org/dist/ \
   	https://www.apache.org/dist/ \
   	https://archive.apache.org/dist/
   
   RUN set -eux; \
   	\
   	ddist() { \
   		local f="$1"; shift; \
   		local distFile="$1"; shift; \
   		local success=; \
   		local distUrl=; \
   		for distUrl in $APACHE_DIST_URLS; do \
   			if wget -O "$f" "$distUrl$distFile"; then \
   				success=1; \
   				break; \
   			fi; \
   		done; \
   		[ -n "$success" ]; \
   	}; \
   	\
   	ddist 'hadoop.tar.gz' "hadoop/core/hadoop-2.7.4/hadoop-2.7.4.tar.gz";
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services