From 1d9e59564ca4bf1ec302e9bcc3c0ac2020a7a31f Mon Sep 17 00:00:00 2001 From: Dmitriy Pleshevskiy Date: Thu, 9 Mar 2023 15:16:51 +0300 Subject: [PATCH] use auth flags if provide registry --- entrypoint.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 9375b14..e09daaf 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,13 +2,16 @@ set -ex +if [ -n "${PLUGIN_REGISTRY:-$ORG_REGISTRY}" ]; then + AUTH_FLAGS=--with-registry-auth +fi + if [ -n "$PLUGIN_PASSWORD" ]; then echo -n "$PLUGIN_PASSWORD" | \ docker login \ -u "$PLUGIN_USERNAME" \ --password-stdin \ ${PLUGIN_REGISTRY:-$ORG_REGISTRY} - AUTH_FLAGS=--with-registry-auth fi docker stack deploy \