use auth flags if provide registry
This commit is contained in:
parent
91bf64d3ab
commit
1d9e59564c
1 changed files with 4 additions and 1 deletions
|
@ -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 \
|
||||
|
|
Reference in a new issue