diff --git a/.travis.yml b/.travis.yml index 4217cf5..5cbd644 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,3 +24,10 @@ deploy: skip_cleanup: true on: tags: true + +after_deploy: + - if [ "$TRAVIS_BRANCH" == "master" ]; then + docker build -t kelvin .; + docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"; + docker push stefanwichmann/kelvin; + fi diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8cff00c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM alpine:latest +WORKDIR /etc/opt/kelvin +VOLUME /etc/opt/kelvin + +RUN apk --no-cache add ca-certificates && update-ca-certificates +COPY dist/kelvin-linux-amd64-v* /opt/kelvin/ + +ENTRYPOINT /opt/kelvin/kelvin 2>&1 | tee /var/log/kelvin.log