From d17e215c424fae9b9befc23922f93e23ef273191 Mon Sep 17 00:00:00 2001
From: Jacob <kobe@live.com.au>
Date: Tue, 25 Jul 2023 08:58:36 +0000
Subject: [PATCH] fix(kaniko): Allow repositories with port numbers to be used
 for caching

---
 templates/gitlab-ci-docker.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/templates/gitlab-ci-docker.yml b/templates/gitlab-ci-docker.yml
index 2c42716..10e8964 100644
--- a/templates/gitlab-ci-docker.yml
+++ b/templates/gitlab-ci-docker.yml
@@ -416,7 +416,7 @@ stages:
 
   function run_build_kaniko() {
     docker_image=$1
-    kaniko_registry_repository=$(echo "$DOCKER_SNAPSHOT_IMAGE" | cut -d: -f1)
+    kaniko_registry_repository="${DOCKER_SNAPSHOT_IMAGE%:*}"
     shift
     if [[ -n "$DOCKER_REGISTRY_MIRROR" ]]
     then
-- 
GitLab