From 3ee272d94a44f01ca72d340e5b8aa7621ecfda0b Mon Sep 17 00:00:00 2001 From: Roxedus Date: Thu, 10 Jan 2019 21:07:54 +0100 Subject: [PATCH] Docker InitTest --- .gitlab-ci.yml | 17 +++++++++++++++++ dockerfile | 18 ++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 .gitlab-ci.yml create mode 100644 dockerfile diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..2b47c0d --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,17 @@ + build: + image: docker:stable + services: + - docker:dind + variables: + DOCKER_HOST: tcp://docker:2375 + DOCKER_DRIVER: overlay2 + CONTAINER_IMAGE: registry.gitlab.com/$CI_PROJECT_PATH + before_script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN registry.gitlab.com + stage: build + script: + - docker build -t registry.gitlab.com/ev-1/shite-music-bot . + - docker push $CONTAINER_IMAGE:$CI_COMMIT_SHA + - docker push $CONTAINER_IMAGE:latest + only: + - master \ No newline at end of file diff --git a/dockerfile b/dockerfile new file mode 100644 index 0000000..81b85ed --- /dev/null +++ b/dockerfile @@ -0,0 +1,18 @@ +FROM lsiobase/alpine.python3 + +LABEL maintainer="Roxedus" + + +COPY / /app + +RUN \ + python3 -m pip install -r /app/requirements.txt && \ + chown -R abc:abc \ + /config \ + /app + +WORKDIR /app + +CMD ln -sf /app/data /config && python3 /app/bot.py + +VOLUME /config \ No newline at end of file