with cache
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Kasper Juul Hermansen 2022-08-21 00:05:10 +02:00
parent 05a1670317
commit 16cf5d8fe4
Signed by: kjuulh
GPG Key ID: 0F95C140730F2F23

View File

@ -3,6 +3,7 @@
set -e
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
latest_tag="$REGISTRY/$SERVICE:latest"
if [[ -n $DEBUG ]]
then
@ -13,5 +14,9 @@ then
echo " TMP: $TMP"
fi
DOCKER_BUILDKIT=1 docker build -t "$tag" -f "$TMP/build_release.Dockerfile" .
echo "docker: logging in"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
DOCKER_BUILDKIT=1 docker build -t "$tag" --build-arg BUILDKIT_INLINE_CACHE=1 --cache-from $latest_tag -f "$TMP/build_release.Dockerfile" .
docker tag "$tag" "$latest_tag"