Archived
2
0
This commit is contained in:
m1k1o 2021-04-01 21:12:32 +02:00
parent b2f60d36a5
commit b6c032921d

View File

@ -21,30 +21,24 @@ build_server() {
} }
build() { build() {
IMAGE="${IMAGE}:$1"
echo "Building $IMAGE"
if [ "$1" = "base" ] if [ "$1" = "base" ]
then then
# build base # build base
docker build -t "${IMAGE}" -f base/Dockerfile "${BASE}" docker build -t "${IMAGE}:base" -f base/Dockerfile "${BASE}"
else else
# buld image # buld image
docker build -t "${IMAGE}" -f "$1/Dockerfile" "$1/" docker build -t "${IMAGE}:$1" -f "$1/Dockerfile" "$1/"
fi fi
} }
build_arm() { build_arm() {
IMAGE="${IMAGE}:arm-$1"
echo "Building (arm) $IMAGE"
if [ "$1" = "base" ] if [ "$1" = "base" ]
then then
# build ARM base # build ARM base
docker build -t "${IMAGE}" -f arm-base/Dockerfile "${BASE}" docker build -t "${IMAGE}:arm-base" -f arm-base/Dockerfile "${BASE}"
else else
# buld ARM image # buld ARM image
docker build -t "${IMAGE}" --build-arg="BASE_IMAGE=${IMAGE}:arm-base" -f "$1/Dockerfile" "$1/" docker build -t "${IMAGE}:arm-$1" --build-arg="BASE_IMAGE=${IMAGE}:arm-base" -f "$1/Dockerfile" "$1/"
fi fi
} }