Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Official docker support. #605

Merged
merged 1 commit into from Jan 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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:8u242-jdk-slim-buster 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:8u242-jdk-slim-buster
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