From 5d87c74045210cef5bbfc8b16db986b6fd7c133b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Stefan=20B=C3=BCrk?= <stefan@buerk.tech>
Date: Sat, 4 Mar 2023 15:00:35 +0100
Subject: [PATCH] [TASK] Switch to custom build docker-dind image
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Due a regression since GitLab runner 15.1,we cannot
use the official docker dind image to raise runner
version to keep up with the TYPO3 gitlab instance.

Because of other issues, using a custom docker dind
image with changed expose port for the healthcheck
to work around that issue is needed.

See: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29130

After Gitlab has released a proper fix for this,
this should be reverted and the official docker
dind image used again.

Resolves: #100086
Releases: main, 12.1, 11.5, 10.4
Change-Id: I4b433ba7f3a42c718b4d436cf42cdf619b9094ca
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/78028
Tested-by: core-ci <typo3@b13.com>
Reviewed-by: Stefan Bürk <stefan@buerk.tech>
Tested-by: Stefan Bürk <stefan@buerk.tech>
---
 Build/gitlab-ci.yml | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/Build/gitlab-ci.yml b/Build/gitlab-ci.yml
index 97a6bdfcb899..48cdbb4d66ac 100644
--- a/Build/gitlab-ci.yml
+++ b/Build/gitlab-ci.yml
@@ -40,13 +40,18 @@ services:
   # Each job starts two containers: This dind container that starts a docker
   # daemon, plus a casual container that executes runTests.sh for single jobs
   # to start containers within the dind container.
-  - name: docker:20.10-dind
+  # @todo Using custom dind image meanwhile to mitigate gitlab-runner healthcheck issue:
+  #       See: https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29130
+  #       Original: docker:20.10-dind
+  - name: typo3/core-testing-docker-dind:latest
     alias: docker
 
 # This is *never* overridden in single jobs. All jobs start a 'dind' service
 # so runTests.sh starts 'sub' containers within the dind container, and this
 # main entry point container executes runTests.sh to start containers.
-image: typo3/core-testing-docker:latest
+# @todo ^1.2 builds seems to be broken. This leads to endless pulls by not using the proxy registry and failing
+#       acceptance install tests. Pin it to latest working version and investigate later.
+image: typo3/core-testing-docker:1.1.0
 
 stages:
   # Stages for pre-merge
-- 
GitLab