Skip to content

Commit

Permalink
Added 1.3.1 version
Browse files Browse the repository at this point in the history
  • Loading branch information
aidar committed Jun 25, 2017
1 parent 4812589 commit aa79313
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
27 changes: 27 additions & 0 deletions 1.3.1/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM openjdk:8-jre-alpine
MAINTAINER Aidar Bariev <aidarbariev@gmail.com>

RUN apk add --no-cache \
bash \
su-exec

ENV HBASE_DATA_DIR=/data

ARG VERSION=1.3.1
ARG HBASE_NAME=hbase-$VERSION
ARG DISTRO_NAME=$HBASE_NAME-bin

RUN set -x \
&& wget -q "http://www.apache.org/dist/hbase/$VERSION/$DISTRO_NAME.tar.gz" \
&& tar -xzf "$DISTRO_NAME.tar.gz" \
&& rm -r "$DISTRO_NAME.tar.gz" \
&& rm $HBASE_NAME/conf/hbase-site.xml

WORKDIR $HBASE_NAME
VOLUME ["$HBASE_DATA_DIR"]

EXPOSE 60000 60010

COPY docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["bin/hbase", "master", "start"]
17 changes: 17 additions & 0 deletions 1.3.1/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -e

# Generate the config only if it doesn't exist
if [ ! -f "conf/hbase-site.xml" ]; then
CONFIG="conf/hbase-site.xml"

echo "<?xml version=\"1.0\"?>" >> $CONFIG
echo "<?xml-stylesheet type=\"text/xsl\" href=\"configuration.xsl\"?>" >> $CONFIG
echo "<configuration>" >> $CONFIG
echo "<property><name>hbase.rootdir</name><value>file://$HBASE_DATA_DIR/hbase</value></property>" >> $CONFIG
echo "<property><name>hbase.zookeeper.property.dataDir</name><value>file://$HBASE_DATA_DIR/zookeeper</value></property>" >> $CONFIG
echo "</configuration>" >> $CONFIG
fi

exec "$@"

0 comments on commit aa79313

Please sign in to comment.