comparison scripts/pull-updates.sh @ 49:757f89c5a19c

add script to pull updated ssdt app images
author smith@nwoca.org
date Mon, 22 Feb 2016 17:23:18 +0000
parents
children
comparison
equal deleted inserted replaced
48:809ba4a960bc 49:757f89c5a19c
1 #
2 # Pulls updates from upstream repository for images matching filter. The
3 # default filter pulls all ssdt application images.
4 #
5 # Usage:
6 # pull-updates.sh [application] [filter]
7 #
8 # defaults:
9 # application=all applications
10 # filter=label=io.ssdt.app[=application]
11 #
12 # Note: if filter is provided, the first argument is ignored. A complete filter must be supplied.
13 #
14 APP=${1:+=$1}
15 FILTER=${2:-label=io.ssdt.app$APP}
16 while read -a line
17 do
18 repo=${line[0]}
19 tag=${line[1]}
20 if [[ $repo == docker.ssdt.io* ]]
21 then
22 echo "docker pull ${repo}:${tag}"
23 docker pull ${repo}:${tag}
24 fi
25 done < <(docker images --filter "$FILTER")