diff --git a/Dockerfile b/Dockerfile index 7579cd5..f776b23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 USER root diff --git a/plugin.sh b/plugin.sh index 31e8cd3..08a2981 100755 --- a/plugin.sh +++ b/plugin.sh @@ -84,6 +84,10 @@ if [[ "${PLUGIN_AUTO_TAG:-}" == "true" ]]; then 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 DESTINATIONS=$(echo "${PLUGIN_TAGS}" | tr ',' '\n' | while read tag; do echo "--destination=${REGISTRY}/${PLUGIN_REPO}:${tag} "; done) elif [ -f .tags ]; then @@ -106,4 +110,5 @@ fi ${CACHE_REPO:-} \ ${TARGET:-} \ ${BUILD_ARGS:-} \ - ${BUILD_ARGS_FROM_ENV:-} + ${BUILD_ARGS_FROM_ENV:-} \ + ${MIRROR:-}