arm build with common dockerfile.
This commit is contained in:
parent
f9aaabd831
commit
5931123bb3
10
.m1k1o/build
10
.m1k1o/build
@ -43,7 +43,7 @@ build() {
|
|||||||
# build base
|
# build base
|
||||||
docker build -t "${BUILD_IMAGE}:base" -f base/Dockerfile "${BASE}"
|
docker build -t "${BUILD_IMAGE}:base" -f base/Dockerfile "${BASE}"
|
||||||
else
|
else
|
||||||
# buld image
|
# build image
|
||||||
docker build -t "${BUILD_IMAGE}:$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:base" -f "$1/Dockerfile" "$1/"
|
docker build -t "${BUILD_IMAGE}:$1" --build-arg="BASE_IMAGE=${BUILD_IMAGE}:base" -f "$1/Dockerfile" "$1/"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -53,9 +53,13 @@ build_arm() {
|
|||||||
then
|
then
|
||||||
# build ARM base
|
# build ARM base
|
||||||
docker build -t "${BUILD_IMAGE}:arm-base" -f base/Dockerfile.arm "${BASE}"
|
docker build -t "${BUILD_IMAGE}:arm-base" -f base/Dockerfile.arm "${BASE}"
|
||||||
else
|
elif [ -f "$1/Dockerfile.arm" ]
|
||||||
# buld ARM image
|
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/"
|
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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user