diff --git a/hive/2.1.1/Dockerfile b/hive/2.1.1/Dockerfile index c0c8c15..b5904bc 100644 --- a/hive/2.1.1/Dockerfile +++ b/hive/2.1.1/Dockerfile @@ -1,4 +1,4 @@ -FROM newnius/hadoop:2.7.4 +FROM alpine:3.8 MAINTAINER Newnius @@ -16,9 +16,6 @@ ENV PATH $PATH:$HIVE_HOME/bin ADD mysql-connector-java-5.1.44-bin.jar $HIVE_HOME/lib ADD hive-site.xml $HIVE_HOME/conf -RUN mv /etc/bootstrap.sh /etc/start_hadoop.sh - ADD bootstrap.sh /etc/bootstrap.sh -ADD init_hive.sh /etc/init_hive.sh CMD ["/etc/bootstrap.sh", "-d"] diff --git a/hive/2.1.1/Dockerfile.bak b/hive/2.1.1/Dockerfile.bak new file mode 100644 index 0000000..c0c8c15 --- /dev/null +++ b/hive/2.1.1/Dockerfile.bak @@ -0,0 +1,24 @@ +FROM newnius/hadoop:2.7.4 + +MAINTAINER Newnius + +USER root + +# Install Apche Hive +RUN wget -O apache-hive.tar.gz http://www-eu.apache.org/dist/hive/hive-2.1.1/apache-hive-2.1.1-bin.tar.gz && \ +tar -xzf apache-hive.tar.gz -C /usr/local/ && rm apache-hive.tar.gz + +RUN ln -s /usr/local/apache-hive-2.1.1-bin /usr/local/hive + +ENV HIVE_HOME /usr/local/apache-hive-2.1.1-bin +ENV PATH $PATH:$HIVE_HOME/bin + +ADD mysql-connector-java-5.1.44-bin.jar $HIVE_HOME/lib +ADD hive-site.xml $HIVE_HOME/conf + +RUN mv /etc/bootstrap.sh /etc/start_hadoop.sh + +ADD bootstrap.sh /etc/bootstrap.sh +ADD init_hive.sh /etc/init_hive.sh + +CMD ["/etc/bootstrap.sh", "-d"] diff --git a/hive/2.1.1/bootstrap.sh b/hive/2.1.1/bootstrap.sh index b78cf2c..d4c757b 100755 --- a/hive/2.1.1/bootstrap.sh +++ b/hive/2.1.1/bootstrap.sh @@ -1,8 +1,5 @@ #!/bin/bash -# setup hadoop -bash /etc/start_hadoop.sh -bash - hive --service metastore if [[ $1 == "-d" ]]; then diff --git a/hive/2.1.1/bootstrap.sh.bak b/hive/2.1.1/bootstrap.sh.bak new file mode 100755 index 0000000..b78cf2c --- /dev/null +++ b/hive/2.1.1/bootstrap.sh.bak @@ -0,0 +1,14 @@ +#!/bin/bash + +# setup hadoop +bash /etc/start_hadoop.sh -bash + +hive --service metastore + +if [[ $1 == "-d" ]]; then + while true; do sleep 1000; done +fi + +if [[ $1 == "-bash" ]]; then + /bin/bash +fi