-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
45 lines (35 loc) · 1.49 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
FROM java:8-jre-alpine
MAINTAINER Denis Baryshev <[email protected]>
ENV HBASE_VERSION 1.4.4
ENV HBASE_HOME /usr/local/hbase-${HBASE_VERSION}
ENV HBASE_CONF_DIR /etc/hbase
ENV HBASE_RPC_TIMEOUT 300000
ENV HBASE_SCANNER_TIMEOUT 300000
# Default port to connect Zookeeper to
ENV ZK_PORT 2181
LABEL vendor=ActionML \
version_tags="[\"1.4\",\"1.4.4\"]"
# Update alpine and install required tools
RUN echo "@community http://nl.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories && \
apk add --update --no-cache bash curl shadow@community
## Fetch, unpack hbase dist and prepare layout
RUN curl -L http://www-us.apache.org/dist/hbase/$HBASE_VERSION/hbase-$HBASE_VERSION-bin.tar.gz \
| tar -xzp -C /usr/local && \
mv ${HBASE_HOME}/conf ${HBASE_CONF_DIR} && \
ln -s ${HBASE_CONF_DIR} ${HBASE_HOME}/conf
## Install confd
RUN curl -L https://github.com/kelseyhightower/confd/releases/download/v0.12.0-alpha3/confd-0.12.0-alpha3-linux-amd64 \
-o /usr/local/bin/confd && chmod 755 /usr/local/bin/confd
## Create users (to go "non-root") and set directory permissions
RUN useradd -mU -d /home/hadoop hadoop && passwd -d hadoop && \
useradd -mU -d /home/hbase -G hadoop hbase && passwd -d hbase
## Add configuration and scripts into container
ADD ./conf/* /etc/hbase
ADD ./conf.d /etc/confd/conf.d
ADD ./templates /etc/confd/templates
ADD ./*.sh /
## Volumes
VOLUME [ "/etc/hbase" ]
ENTRYPOINT [ "/entrypoint.sh" ]
# Hbase exposed ports
EXPOSE 16000 16010 16020 16030