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
|
set -ex
|
||||||
|
|
||||||
|
if [ -n "${PLUGIN_REGISTRY:-$ORG_REGISTRY}" ]; then
|
||||||
|
AUTH_FLAGS=--with-registry-auth
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "$PLUGIN_PASSWORD" ]; then
|
if [ -n "$PLUGIN_PASSWORD" ]; then
|
||||||
echo -n "$PLUGIN_PASSWORD" | \
|
echo -n "$PLUGIN_PASSWORD" | \
|
||||||
docker login \
|
docker login \
|
||||||
-u "$PLUGIN_USERNAME" \
|
-u "$PLUGIN_USERNAME" \
|
||||||
--password-stdin \
|
--password-stdin \
|
||||||
${PLUGIN_REGISTRY:-$ORG_REGISTRY}
|
${PLUGIN_REGISTRY:-$ORG_REGISTRY}
|
||||||
AUTH_FLAGS=--with-registry-auth
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
docker stack deploy \
|
docker stack deploy \
|
||||||
|
|
Reference in a new issue