This commit is contained in:
parent
8f82b12133
commit
d64189d859
16
build.sh
16
build.sh
@ -8,14 +8,20 @@ function build_image() {
|
|||||||
docker build -t "$image_name:latest" -f "$dockerfile" .
|
docker build -t "$image_name:latest" -f "$dockerfile" .
|
||||||
}
|
}
|
||||||
|
|
||||||
# iterate through the docker files in format Dockerfile.IMAGE_NAME
|
pids=()
|
||||||
for dockerfile in Dockerfile.*
|
for dockerfile in Dockerfile.*; do
|
||||||
do
|
|
||||||
(
|
(
|
||||||
build_image "$dockerfile"
|
build_image "$dockerfile"
|
||||||
) &
|
) &
|
||||||
|
pids+=($!)
|
||||||
done
|
done
|
||||||
|
|
||||||
wait
|
fail=0
|
||||||
|
for pid in "${pids[@]}"; do
|
||||||
|
wait "$pid" || fail=1
|
||||||
|
done
|
||||||
|
|
||||||
|
if (( fail )); then
|
||||||
|
echo "One or more builds failed."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user