forked from tsuyo/apache-hbase-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile.pseudo
36 lines (27 loc) · 1.01 KB
/
Dockerfile.pseudo
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
FROM alpine:latest AS build-env
MAINTAINER Tsuyoshi Miyake <[email protected]>
# HBase 2.1.4 doesn't work with Hadoop 2.9.2
ARG HBASE_VERSION="2.0.5"
ENV HBASE_VERSION ${HBASE_VERSION}
WORKDIR /app
RUN \
apk update && \
apk add jq
RUN \
CLOSER_URL=`wget -q -O - 'https://www.apache.org/dyn/closer.lua' | jq --raw-output '.preferred'` && \
wget -q -O - ${CLOSER_URL}/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz | \
tar zxf - && \
mv hbase-${HBASE_VERSION}* hbase
FROM kirasoa/apache-hadoop-pseudo-yarn:2.9.2
COPY --chown=hadoop:hadoop --from=build-env /app /app
ENV HBASE_HOME /app/hbase
ENV PATH ${PATH}:${HBASE_HOME}/bin
ENV START_SCRIPT start-apache-hbase-pseudo.sh
ADD conf/hbase-site.xml ${HBASE_HOME}/conf
ADD command/${START_SCRIPT} /usr/sbin
RUN \
chmod +x /usr/sbin/${START_SCRIPT} && \
echo "export JAVA_HOME=${JAVA_HOME}" >> ${HBASE_HOME}/conf/hbase-env.sh && \
echo "PATH=$PATH" >> /home/hadoop/.bashrc
WORKDIR /workspace
CMD ["sh", "-c", "/usr/sbin/${START_SCRIPT} && tail -f /dev/null"]