This commit is contained in:
PB
2022-10-12 17:51:29 +02:00
parent af40a74b69
commit 943b1cb30e
4 changed files with 24 additions and 1 deletions

View File

@@ -3,4 +3,14 @@
export IMAGE_NAME="git.pbiernat.dev/egommerce/apigw-svc"
docker build --rm --cache-from "$IMAGE_NAME:latest" -t "$IMAGE_NAME:latest" .
TARGET=${1:-latest}
echo "Building: $IMAGE_NAME:$TARGET"
if [ $TARGET = "dev" ]
then
docker build --rm --no-cache -t "$IMAGE_NAME:dev" . >/dev/null 2>&1
else
docker build --rm --cache-from "$IMAGE_NAME:$TARGET" -t "$IMAGE_NAME:$TARGET" . >/dev/null 2>&1
fi
echo "Done."