1
0
mirror of https://github.com/nextcloud/docker.git synced 2024-06-24 08:26:38 +02:00
docker-nextcloud/.travis/test-example-dockerfiles.sh
Felix Bühler 961aeb147e
run bash via env command (#1637)
`#!/usr/bin/env` searches `PATH` for `bash`, and `bash` is not always in `/bin``

Signed-off-by: Felix Buehler <account@buehler.rocks>
2022-01-07 22:22:35 +00:00

19 lines
340 B
Bash
Executable File

#!/usr/bin/env 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" .
)
fi
done