Nextcloud-Docker/.travis/test-example-dockerfiles.sh

20 lines
388 B
Bash
Raw Normal View History

#!/bin/bash
set -e
image="$1"
cd .examples/dockerfiles
dirs=( */ )
dirs=( "${dirs[@]%/}" )
for dir in "${dirs[@]}"; do
if [ -d "$dir/$VARIANT" ]; then
(
2018-08-01 20:55:25 +00:00
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