From cf9a6e35380e8a148595d4b7e79bd17d16367fa1 Mon Sep 17 00:00:00 2001 From: Administrator Date: Thu, 3 Jun 2021 12:46:29 +0000 Subject: [PATCH] Update .gitlab-ci.yml --- .gitlab-ci.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ed36d2c..e3c6594 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,16 +1,23 @@ +.install_docker: &install_docker | + apt-get update + apt-get -y install apt-transport-https ca-certificates curl software-properties-common + curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - + add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" + apt-get update + apt-get -y install docker-ce + # This file is a template, and might need editing before it works on your project. docker-build: # Official docker image. - image: docker:20.10.6 + image: python:3.6.5 variables: DOCKER_HOST: tcp://docker:2375 DOCKER_TLS_CERTDIR: "" stage: build tags: - docker - services: - - docker:20.10.6-dind before_script: + - *install_docker - docker info - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: @@ -21,16 +28,15 @@ docker-build: docker-build-master: # Official docker image. - image: docker:20.10.6 + image: python:3.6.5 variables: DOCKER_HOST: tcp://docker:2375 DOCKER_TLS_CERTDIR: "" stage: build tags: - docker - services: - - docker:20.10.6-dind before_script: + - *install_docker - docker info - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY script: