bosun.org@v0.0.0-20210513094433-e25bc3e69a1f/docker/opentsdb.Dockerfile (about) 1 FROM alpine:latest 2 3 ARG HBASE_VERSION=2.2.4 4 ARG GNUPLOT_VERSION=5.2.8 5 6 ARG PACKAGES="ca-certificates rsyslog bash openjdk8 curl libgd libpng libjpeg libwebp libjpeg-turbo cairo pango jruby lua supervisor asciidoctor" 7 ARG BUILD_PACKAGES="build-base autoconf make automake git python3 cairo-dev pango-dev gd-dev lua-dev readline-dev libpng-dev libjpeg-turbo-dev libwebp-dev" 8 9 ARG DOCKER_ROOT="docker" 10 ARG HBASE_DIR=/hbase 11 12 ENV DATA_DIR /data 13 ENV TSDB_DIR /tsdb 14 ENV HBASE_HOME ${HBASE_DIR} 15 16 ENV JAVA_HOME=/usr/lib/jvm/java-1.8-openjdk 17 ENV PATH="$JAVA_HOME/bin:${PATH}" 18 19 # Install dependencies 20 RUN apk --update add apk-tools \ 21 && apk add ${PACKAGES} ${BUILD_PACKAGES} \ 22 && ln -sf python3 /usr/bin/python 23 24 WORKDIR /tmp/gnuplot 25 RUN cd /tmp \ 26 && curl -L -o - https://downloads.sourceforge.net/project/gnuplot/gnuplot/${GNUPLOT_VERSION}/gnuplot-${GNUPLOT_VERSION}.tar.gz | tar -xzf - --strip-components 1 \ 27 && ./configure \ 28 && make install \ 29 && rm -rf /tmp/gnuplot 30 31 32 # Install HBase 33 WORKDIR ${HBASE_DIR} 34 RUN curl -L -o - http://archive.apache.org/dist/hbase/${HBASE_VERSION}/hbase-${HBASE_VERSION}-bin.tar.gz | tar -xzf - --strip-components 1 35 36 COPY ${DOCKER_ROOT}/hbase-site.xml ${HBASE_DIR}/conf/ 37 COPY ${DOCKER_ROOT}/start_hbase.sh ${HBASE_DIR}/ 38 39 40 # Install OpenTSDB 41 RUN cd /tmp \ 42 && curl -OL https://github.com/OpenTSDB/opentsdb/archive/v2.4.0.zip \ 43 && unzip v2.4.0.zip \ 44 && mv opentsdb-2.4.0 ${TSDB_DIR} \ 45 && rm /tmp/v2.4.0.zip \ 46 && cd ${TSDB_DIR} \ 47 && find . -name '*.mk' | xargs sed -i s#http://central.maven.org#https://repo1.maven.org#g \ 48 && find . -name '*.mk' | xargs sed -i s#http://repo1.maven.org#https://repo1.maven.org#g \ 49 && ./build.sh 50 51 COPY ${DOCKER_ROOT}/tsdb/opentsdb.conf ${TSDB_DIR} 52 COPY ${DOCKER_ROOT}/tsdb/start_opentsdb.sh ${TSDB_DIR} 53 COPY ${DOCKER_ROOT}/tsdb/create_tsdb_tables.sh ${TSDB_DIR} 54 55 # Copy supervisor config 56 COPY ${DOCKER_ROOT}/data/supervisord-opentsdb.conf ${DATA_DIR}/ 57 58 EXPOSE 4242 59 VOLUME ["${DATA_DIR}", "/var/log", "${TSDB_DIR}"] 60 CMD ["sh", "-c", "/usr/bin/supervisord -c ${DATA_DIR}/supervisord-opentsdb.conf"]