Skip to content

Commit

Permalink
Official docker support.
Browse files Browse the repository at this point in the history
Fixes #26.
  • Loading branch information
rcosnita committed Jan 25, 2020
1 parent 776c9cd commit 2ca9dd8
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
@@ -0,0 +1,5 @@
build
.git
.tablesawcache
.travis.yml
Dockerfile
28 changes: 28 additions & 0 deletions Dockerfile
@@ -0,0 +1,28 @@
ARG KAIROSDB_VERSION=1.3.0-0.1beta

FROM openjdk:8-jdk-slim-stretch as build
ARG KAIROSDB_VERSION

WORKDIR /home/kairosdb
ADD . /home/kairosdb/git

RUN cd git && \
export CLASSPATH=tools/tablesaw-1.2.7.jar && \
java make package

RUN tar -xzvf git/build/kairosdb-${KAIROSDB_VERSION}.tar.gz

FROM openjdk:8-jre-slim-stretch
ARG KAIROSDB_VERSION
ENV KAIROSDB_HOME=/opt/kairosdb-${KAIROSDB_VERSION}
ENV CLASSPATH=${KAIROSDB_HOME}/lib/*

COPY --from=build /home/kairosdb/kairosdb /opt/kairosdb-${KAIROSDB_VERSION}

RUN ln -s ${KAIROSDB_HOME}/conf /etc/kairosdb && \
echo 'export PATH=${KAIROSDB_HOME}/bin:${PATH}' >> /root/.bashrc

EXPOSE 8080 4242

WORKDIR /opt/kairosdb-${KAIROSDB_VERSION}/bin
ENTRYPOINT . ~/.bashrc && kairosdb.sh run
4 changes: 4 additions & 0 deletions how_to_build.txt
Expand Up @@ -8,3 +8,7 @@ Then to build type

You can also get help on what targets are available by typing
>java make help

If you prefer to use docker you can easily run the following commands from the top folder of this repository:
>docker build -t kairosdb:1.3.0_beta1 .
>docker run -it --rm -p 0.0.0.0:8080:8080 -p 0.0.0.0:4242:4242 kairosdb:1.3.0_beta1

0 comments on commit 2ca9dd8

Please sign in to comment.