Archived
2
0

arm build with common dockerfile.

This commit is contained in:
m1k1o 2021-04-03 13:56:41 +02:00
parent f9aaabd831
commit 5931123bb3

View File

@ -43,7 +43,7 @@ build() {
# build base
docker build -t "${BUILD_IMAGE}:base" -f base/Dockerfile "${BASE}"
else
# buld image
# build image
docker build -t "${BUILD_IMAGE}:$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:base" -f "$1/Dockerfile" "$1/"
fi
}
@ -53,9 +53,13 @@ build_arm() {
then
# build ARM base
docker build -t "${BUILD_IMAGE}:arm-base" -f base/Dockerfile.arm "${BASE}"
else
# buld ARM image
elif [ -f "$1/Dockerfile.arm" ]
then
# build dedicated ARM image
docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile.arm" "$1/"
else
# try to build ARM image with common Dockerfile
docker build -t "${BUILD_IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:arm-base" -f "$1/Dockerfile" "$1/"
fi
}