api-gateway/deploy/image-build.sh

16 lines
357 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# RUN IN REPO ROOT DIR !!
2022-11-11 05:05:26 +01:00
IMAGE_NAME="git.pbiernat.dev/egommerce/apigw-svc"
2022-10-12 17:51:29 +02:00
TARGET=${1:-latest}
echo "Building: $IMAGE_NAME:$TARGET"
if [ $TARGET = "latest" ]
2022-10-12 17:51:29 +02:00
then
docker build --rm --cache-from "$IMAGE_NAME:$TARGET" -t "$IMAGE_NAME:$TARGET"
2022-10-12 17:51:29 +02:00
else
2022-11-11 05:05:26 +01:00
docker build --rm --no-cache -t "$IMAGE_NAME:$TARGET" . #>/dev/null 2>&1
2022-10-12 17:51:29 +02:00
fi
echo "Done."