Add support for docker hub mirrors and update image version (#1)

This commit is contained in:
CrimsonFez 2024-01-12 14:23:42 -06:00 committed by GitHub
parent ca7005705e
commit 5d73eef647
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View file

@ -1,4 +1,4 @@
FROM gcr.io/kaniko-project/executor:debug-v0.19.0 FROM gcr.io/kaniko-project/executor:v1.19.2-debug
ENV HOME /root ENV HOME /root
ENV USER root ENV USER root

View file

@ -84,6 +84,10 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then
fi fi
fi fi
if [ -n "${PLUGIN_MIRRORS:-}" ]; then
MIRROR="$(echo $PLUGIN_MIRRORS | tr ',' '\n' | while read mirror; do echo "--registry-mirror=${mirror}"; done)"
fi
if [ -n "${PLUGIN_TAGS:-}" ]; then if [ -n "${PLUGIN_TAGS:-}" ]; then
DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done) DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done)
elif [ -f .tags ]; then elif [ -f .tags ]; then
@ -106,4 +110,5 @@ fi
${CACHE_REPO:-} \ ${CACHE_REPO:-} \
${TARGET:-} \ ${TARGET:-} \
${BUILD_ARGS:-} \ ${BUILD_ARGS:-} \
${BUILD_ARGS_FROM_ENV:-} ${BUILD_ARGS_FROM_ENV:-} \
${MIRROR:-}