diff --git a/Storage/drill/1.22.0/24.03-lts-sp1/Dockerfile b/Storage/drill/1.22.0/24.03-lts-sp1/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..7ab4b7ce9c4050b701386b444280fc5516730b48 --- /dev/null +++ b/Storage/drill/1.22.0/24.03-lts-sp1/Dockerfile @@ -0,0 +1,37 @@ +ARG BASE=openeuler/openeuler:24.03-lts-sp1 +FROM ${BASE} + +ARG VERSION=1.22.0 + + +ARG PACKAGE=apache-drill-${VERSION}.tar.gz +ARG PACKAGE_RUL=https://dlcdn.apache.org/drill/${VERSION}/${PACKAGE} + +ENV DRILL_HEAP=900M +ENV ZOOKEEPER_HOST=zookeeper +ENV PATH $PATH:/apache-drill/bin:/zookeeper/bin + +WORKDIR / +RUN dnf install -y java-1.8.0-openjdk-devel supervisor which && \ + yum clean all && \ + mkdir -p /etc/supervisor.d + +RUN curl -fSL -o "${PACKAGE}" "$PACKAGE_RUL" && \ + tar zxf "${PACKAGE}" && \ + test -d "apache-drill-${VERSION}" && \ + rm -fv "${PACKAGE}" && \ + ln -sv "apache-drill-${VERSION}" apache-drill + +COPY entrypoint.sh / +COPY drill.ini /etc/supervisor.d/ +RUN sed -i -e "s/-Xms1G/-Xms\$DRILL_MAX_HEAP/" apache-drill/conf/drill-env.sh && \ + sed -i -e "s/^DRILL_MAX_HEAP=.*/DRILL_MAX_HEAP=\"${DRILL_HEAP}\"/" apache-drill/conf/drill-env.sh && \ + sed -i -e "s/^DRILL_HEAP=.*/DRILL_HEAP=\"${DRILL_HEAP}\"/" apache-drill/conf/drill-env.sh && \ + sed -i -e "s/^\([[:space:]]*\)zk.connect:.*/\\1zk.connect: \"${ZOOKEEPER_HOST}\"/" apache-drill/conf/drill-override.conf && \ + chmod 755 /entrypoint.sh + + + +EXPOSE 8047 + +CMD ["/entrypoint.sh"] \ No newline at end of file diff --git a/Storage/drill/1.22.0/24.03-lts-sp1/drill.ini b/Storage/drill/1.22.0/24.03-lts-sp1/drill.ini new file mode 100644 index 0000000000000000000000000000000000000000..eb655ac9e59f676cac65634b73be8c71df28db8c --- /dev/null +++ b/Storage/drill/1.22.0/24.03-lts-sp1/drill.ini @@ -0,0 +1,2 @@ +[program:drill] +command=sh -c '/apache-drill/bin/drillbit.sh start && sleep 2 && tail -f /dev/null /apache-drill/log/*' \ No newline at end of file diff --git a/Storage/drill/1.22.0/24.03-lts-sp1/entrypoint.sh b/Storage/drill/1.22.0/24.03-lts-sp1/entrypoint.sh new file mode 100644 index 0000000000000000000000000000000000000000..14d57b172b0b32818e7a9ac3517585380e7069fd --- /dev/null +++ b/Storage/drill/1.22.0/24.03-lts-sp1/entrypoint.sh @@ -0,0 +1,28 @@ +#!/usr/bin/env bash + +set -euo pipefail +[ -n "${DEBUG:-}" ] && set -x + +export JAVA_HOME="${JAVA_HOME:-/usr}" +export DRILL_HEAP="${DRILL_HEAP:-900M}" +export ZOOKEEPER_HOST="${ZOOKEEPER_HOST:-zookeeper}" + +sed -i -e "s/-Xms1G/-Xms\$DRILL_MAX_HEAP/" apache-drill/conf/drill-env.sh +sed -i -e "s/^DRILL_MAX_HEAP=.*/DRILL_MAX_HEAP=\"${DRILL_HEAP}\"/" apache-drill/conf/drill-env.sh + +sed -i -e "s/^DRILL_HEAP=.*/DRILL_HEAP=\"${DRILL_HEAP}\"/" apache-drill/conf/drill-env.sh +sed -i -e "s/^\\([[:space:]]*\\)zk.connect:.*/\\1zk.connect: \"${ZOOKEEPER_HOST}\"/" apache-drill/conf/drill-override.conf + +if [ -t 0 ]; then + sqlline -u jdbc:drill:zk=local +else + echo " +Running non-interactively, will not open Apache Drill SQL shell + +For Apache Drill shell start this image with 'docker run -t -i' switches + +Otherwise you will need to have a separate ZooKeeper container linked (one is available from harisekhon/zookeeper) and specify: + +docker run -e ZOOKEEPER_HOST=:2181 supervisord -n +" +fi \ No newline at end of file diff --git a/Storage/drill/meta.yml b/Storage/drill/meta.yml index 86e897668302bd181b0dc74a0ad94885f2ef4465..efbe5a312bfe9b78d95435c1436ad65760395ebf 100644 --- a/Storage/drill/meta.yml +++ b/Storage/drill/meta.yml @@ -1,2 +1,4 @@ 1.21.2-oe2403sp1: - path: 1.21.2/24.03-lts-sp1/Dockerfile \ No newline at end of file + path: 1.21.2/24.03-lts-sp1/Dockerfile +1.22.0-oe2403sp1: + path: 1.22.0/24.03-lts-sp1/Dockerfile \ No newline at end of file