From 5f8cf83d35e54c244160ec056abc680ad2e85254 Mon Sep 17 00:00:00 2001 From: bacon Date: Wed, 20 Mar 2024 23:40:58 +0300 Subject: [PATCH] docker --- .gitlab-ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b3db01e..e66c2d8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -78,15 +78,17 @@ variables: # services: # - docker:dind -before_script: - # docker login asks for the password to be passed through stdin for security - # we use $CI_REGISTRY_PASSWORD here which is a special variable provided by GitLab - # https://docs.gitlab.com/ce/ci/variables/predefined_variables.html - - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY -image: docker:20.4.5 + Build: + image: docker:20.4.5 + stage: build + before_script: + # docker login asks for the password to be passed through stdin for security + # we use $CI_REGISTRY_PASSWORD here which is a special variable provided by GitLab + # https://docs.gitlab.com/ce/ci/variables/predefined_variables.html + - echo -n $CI_REGISTRY_PASSWORD | docker login -u $CI_REGISTRY_USER --password-stdin $CI_REGISTRY script: # fetches the latest image (not failing if image is not found) - docker pull $CI_REGISTRY_IMAGE:latest || true