2022-12-02 22:05:47 +01:00
|
|
|
#!/bin/sh
|
|
|
|
# RUN IN REPO ROOT DIR !!
|
|
|
|
|
2024-12-24 14:20:35 +01:00
|
|
|
export IMAGE_NAME="git.ego.cloudns.be/egommerce/api-registry"
|
2022-12-02 22:05:47 +01:00
|
|
|
|
|
|
|
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."
|