17 lines
380 B
Bash
Executable File
17 lines
380 B
Bash
Executable File
#!/bin/sh
|
|
# RUN IN REPO ROOT DIR !!
|
|
|
|
export IMAGE_NAME="git.pbiernat.dev/egommerce/api-eventbus"
|
|
|
|
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."
|