Merge branch '56-docker-20.10.3' into 'master'

Use Docker daemon 20.10.3 instead of 19.03.0

Closes #56

See merge request gitlab-org/gitlab-build-images!365
This commit is contained in:
Rémy Coutable 2021-02-16 12:42:18 +00:00
commit ab8f6f2046
2 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@ include:
default:
image: docker:git
services:
- docker:19.03.0-dind
- docker:20.10.3-dind
before_script:
- docker login -u "gitlab-ci-token" -p "$CI_JOB_TOKEN" "$CI_REGISTRY"
- source scripts/build-helpers.sh
@ -41,7 +41,7 @@ variables:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker pull "$CI_REGISTRY_IMAGE:$1" || true
- docker pull --quiet "$CI_REGISTRY_IMAGE:$1" || true
- docker build --cache-from="$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" .
.build_and_deploy: &build_and_deploy
@ -50,7 +50,7 @@ variables:
# Hack to set an array in /bin/sh
# http://unix.stackexchange.com/a/137571
- set -- $CI_JOB_NAME
- docker pull "$CI_REGISTRY_IMAGE:$1" || true
- docker pull --quiet "$CI_REGISTRY_IMAGE:$1" || true
- docker build --cache-from="$CI_REGISTRY_IMAGE:$1" --label "ci_pipeline_url=$CI_PIPELINE_URL" --label "ci_job_url=$CI_JOB_URL" -t "$CI_REGISTRY_IMAGE:$1" -f "Dockerfile.$1" .
- docker push "$CI_REGISTRY_IMAGE:$1"

View file

@ -304,7 +304,7 @@ function build_custom_if_needed() {
full_image_name="$CI_REGISTRY_IMAGE:$build_image_name"
# This re-uses and builds an existing image if needed
docker pull "$full_image" || true
docker pull --quiet "$full_image" || true
docker_command=$(generate_command $@ --cache-from="$full_image_name" )
echo "Building $build_image_name with $docker_command"
eval $docker_command