Piotr Biernat
b0c2d597ee
All checks were successful
continuous-integration/drone/push Build is passing
16 lines
357 B
Bash
Executable File
16 lines
357 B
Bash
Executable File
#!/bin/sh
|
|
# RUN IN REPO ROOT DIR !!
|
|
|
|
IMAGE_NAME="git.pbiernat.dev/egommerce/apigw-svc"
|
|
TARGET=${1:-latest}
|
|
|
|
echo "Building: $IMAGE_NAME:$TARGET"
|
|
if [ $TARGET = "latest" ]
|
|
then
|
|
docker build --rm --cache-from "$IMAGE_NAME:$TARGET" -t "$IMAGE_NAME:$TARGET"
|
|
else
|
|
docker build --rm --no-cache -t "$IMAGE_NAME:$TARGET" . #>/dev/null 2>&1
|
|
fi
|
|
|
|
echo "Done."
|