mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
add build all script
Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
parent
e4f2e63689
commit
675554b95c
30
build-all.sh
Executable file
30
build-all.sh
Executable file
|
@ -0,0 +1,30 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# get the dockerfiles
|
||||
IFS=$'\n'
|
||||
files=( $(find . -iname '*Dockerfile' | sed 's|./||') )
|
||||
unset IFS
|
||||
|
||||
# build the changed dockerfiles
|
||||
for f in "${files[@]}"; do
|
||||
image=${f%Dockerfile}
|
||||
base=${image%%\/*}
|
||||
suite=${image##*\/}
|
||||
build_dir=$(dirname $f)
|
||||
|
||||
if [[ -z "$suite" ]]; then
|
||||
suite=latest
|
||||
fi
|
||||
|
||||
(
|
||||
set -x
|
||||
docker build --rm --force-rm -t r.j3ss.co/${base}:${suite} ${build_dir}
|
||||
)
|
||||
|
||||
echo " --- "
|
||||
echo "Successfully built ${base}:${suite} with context ${build_dir}"
|
||||
echo " --- "
|
||||
|
||||
docker push --disable-content-trust=false r.j3ss.co/${base}:${suite}
|
||||
done
|
Loading…
Reference in New Issue
Block a user