This commit is contained in:
parent
3d3bd83fa1
commit
8e397d7b55
15
build.sh
15
build.sh
@ -2,13 +2,20 @@
|
|||||||
|
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
|
function build_image() {
|
||||||
|
local dockerfile="$1"
|
||||||
|
local image_name="${dockerfile//Dockerfile./}"
|
||||||
|
docker build -t "$image_name:latest" -f "$dockerfile" .
|
||||||
|
}
|
||||||
|
|
||||||
# iterate through the docker files in format Dockerfile.IMAGE_NAME
|
# iterate through the docker files in format Dockerfile.IMAGE_NAME
|
||||||
for dockerfile in Dockerfile.*
|
for dockerfile in Dockerfile.*
|
||||||
do
|
do
|
||||||
# get the image name from the dockerfile
|
(
|
||||||
image_name="${dockerfile//Dockerfile./}"
|
build_image "$dockerfile"
|
||||||
# build the gitea.jde.nz/public/bb64:debian-curl docker image
|
) &
|
||||||
docker build -t "$image_name:latest" -f "$dockerfile" .
|
|
||||||
done
|
done
|
||||||
|
|
||||||
|
wait
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user