view scripts/updates-pull.sh @ 51:40e10b1d32f7

add script to apply image updates to compose projects
author Dave smith <smith@nwoca.org>
date Mon, 22 Feb 2016 17:32:57 -0500
parents scripts/pull-updates.sh@757f89c5a19c
children 334d65dac778
line wrap: on
line source
# 
# 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")