diff options
Diffstat (limited to '.travis')
-rwxr-xr-x | .travis/test-example-dockerfiles.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/.travis/test-example-dockerfiles.sh b/.travis/test-example-dockerfiles.sh new file mode 100755 index 00000000..e86ed162 --- /dev/null +++ b/.travis/test-example-dockerfiles.sh @@ -0,0 +1,19 @@ +#!/bin/bash +set -e + +image="$1" + +cd .examples/dockerfiles + +dirs=( */ ) +dirs=( "${dirs[@]%/}" ) +for dir in "${dirs[@]}"; do + if [ -d "$dir/$VARIANT" ]; then + ( + cd "$dir/$VARIANT" + sed -ri -e 's/^FROM .*/FROM '"$image"'/g' 'Dockerfile' + docker build -t "$image-$dir" . + ~/official-images/test/run.sh "$image-$dir" + ) + fi +done |