commit 7ceecf8a538d7e69b025fed3b25c57890b0d8136 Author: Deon George Date: Mon Jan 29 22:30:53 2018 +1100 Initial Release diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..e9009d9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,41 @@ +image: docker:latest + +stages: +- test +- build + +variables: + VERSION: latest + CACHETAG: build + DOCKER_REGISTRY: registry.leenooks.net + DOCKER_HOST: tcp://${DOCKER_REGISTRY}-leenooks-ci-docker:2375 + +services: +- ${DOCKER_REGISTRY}/leenooks/ci-docker:dind + +before_script: +- docker info +- docker version +- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN ${DOCKER_REGISTRY} + +test: + stage: test + script: + - cat /etc/hosts + - env|sort + - docker build -t ${CI_REGISTRY_IMAGE}:${VERSION} . + - docker images + only: + - debug + +build: + stage: build + script: + - docker pull ${CI_REGISTRY_IMAGE}:${CACHETAG} || true + - docker build --cache-from ${CI_REGISTRY_IMAGE}:${CACHETAG} -t ${CI_REGISTRY_IMAGE}:${VERSION} -t ${CI_REGISTRY_IMAGE}:${CACHETAG} . + - docker push ${CI_REGISTRY_IMAGE}:${VERSION} + - docker push ${CI_REGISTRY_IMAGE}:${CACHETAG} + tags: + - docker + only: + - master diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..b3baf66 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# NAME leenooks/taskserver +# VERSION latest + +FROM debian:stretch + +RUN apt-get update \ + && apt-get install -y taskd && rm -rf /var/lib/apt/lists/* /tmp/* + +EXPOSE 53589/tcp +ENV TASKDDATA /task + +CMD ["/usr/bin/taskd","server","--data $TASKDDATA"]