Mercurial > public > ssdt-docker
diff scripts/updates-pull.sh @ 90:63cb9be89a26 production v1.0.0
flow: Merged <release> 'v1.0.0' to <master> ('production').
author | smith@nwoca.org |
---|---|
date | Thu, 22 Sep 2016 01:49:20 +0100 |
parents | 334d65dac778 |
children | 018f62da1931 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/scripts/updates-pull.sh Thu Sep 22 01:49:20 2016 +0100 @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Pulls updates from upstream repository for images matching filter. The +# default filter pulls all ssdt application images. +# +# Usage: +# pull-updates.sh [application] [filter] +# +# defaults: +# application=all applications +# filter=label=io.ssdt.app[=application] +# +# Note: if filter is provided, the first argument is ignored. A complete filter must be supplied. +# +APP=${1:+=$1} +FILTER=${2:-label=io.ssdt.app$APP} +while read -a line +do + repo=${line[0]} + tag=${line[1]} + if [[ $repo == docker.ssdt.io* ]] + then + echo "docker pull ${repo}:${tag}" + docker pull ${repo}:${tag} + fi +done < <(docker images --filter "$FILTER")