From 575c60b434cf3e002310d2a88a41fbe70f58a1d3 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Sun, 1 Oct 2017 16:28:24 +0200 Subject: [PATCH] use gitlab docker registry --- .gitignore | 1 + .gitlab-ci.yml | 10 ++++++++++ Dockerfile | 2 +- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 .gitlab-ci.yml diff --git a/.gitignore b/.gitignore index 93bfd12..af0faab 100755 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ .DS_Store +*.swp diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dfde774 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,10 @@ +build: + image: docker:latest + services: + - docker:dind + stage: build + script: + - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY + - docker build --pull --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME --tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA . + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME + - docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA diff --git a/Dockerfile b/Dockerfile index 72d757c..9bb741b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM quay.io/thallian/php7-fpm:latest +FROM registry.gitlab.com/thallian/docker-php7-fpm:latest ENV VERSION 1.3.0