new script docker-build to preconfigure parameters for docker build, set environment variable DOCKER_USER; fixed path in docker-update

This commit is contained in:
Marc Wäckerlin
2018-12-06 14:27:42 +01:00
parent 15015372ea
commit adf279d43a
3 changed files with 24 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ for f in $*; do
echo "upgrading ${name}"
IFS="
"
for param in $(sed -n '/^ *\([^:]\+\): *$/{s//'"${name}"'_\1/;h};/^ *image: */{s///;G;s/\n/ /p}' $file); do
for param in $(sed -n '/^ *\([^:]\+\): *$/{s,,'"${name}"'_\1,;h};/^ *image: */{s///;G;s/\n/ /p}' $file); do
IFS=" "
if [ -z "$limit" ] || [[ "${param}" =~ " ${name}_${limit}" ]]; then
echo "....update $param: docker service update -d --image $param"