Skip to content

Commit bc3ba54

Browse files
committed
drillbits
Drill bits in docker containers
0 parents  commit bc3ba54

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

Diff for: Dockerfile

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
FROM alpine:latest
2+
3+
LABEL maintainer "Prem Ravuri <[email protected]>"
4+
5+
LABEL application Apache_Drill
6+
7+
ARG APACHE_DRILL_VERSION=1.16.0
8+
9+
ENV APPLICATION_HOME /
10+
11+
ENV CONFIG_FILE_PATH /apache-drill/conf/drill-override.conf
12+
13+
ENV CONFIG_FILE_TEMPLATE_PATH ${APPLICATION_HOME}/drill-override.conf.template
14+
15+
WORKDIR ${APPLICATION_HOME}
16+
17+
EXPOSE 8047 31010 31011 31012
18+
19+
COPY entrypoint.sh /
20+
21+
RUN set -x && \
22+
apk add --update libintl && \
23+
apk add --virtual build_deps gettext && \
24+
apk add --no-cache bash openjdk8 which wget tar && \
25+
wget -nv http://apache.cs.utah.edu/drill/drill-${APACHE_DRILL_VERSION}/apache-drill-${APACHE_DRILL_VERSION}.tar.gz && \
26+
tar zxf "apache-drill-${APACHE_DRILL_VERSION}.tar.gz" && \
27+
rm -rf apache-drill-${APACHE_DRILL_VERSION}.tar.gz && \
28+
chmod 777 /entrypoint.sh && \
29+
ln -sv "apache-drill-${APACHE_DRILL_VERSION}" apache-drill && \
30+
cp /usr/bin/envsubst /usr/local/bin/envsubst && \
31+
apk del build_deps wget tar
32+
33+
COPY drill-override.conf.template $CONFIG_FILE_TEMPLATE_PATH
34+
35+
HEALTHCHECK CMD curl --fail http://localhost:8047/ || exit 1
36+
37+
ENTRYPOINT ["/entrypoint.sh"]

Diff for: drill-override.conf.template

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
drill.exec: {
2+
cluster-id: "$CLUSTERID",
3+
zk.connect: "$ZKHOSTS"
4+
}

Diff for: entrypoint.sh

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
#subistute the environment varibles
3+
4+
envsubst < "$CONFIG_FILE_TEMPLATE_PATH" > "$CONFIG_FILE_PATH"
5+
6+
#show the config file
7+
8+
cat $CONFIG_FILE_PATH
9+
10+
#start the Drillbit && tailing Logs
11+
12+
/apache-drill/bin/drillbit.sh start && sleep 2 && tail -f /dev/null /apache-drill/log/*

0 commit comments

Comments
 (0)