cuddle-image/scripts/build_cuddle_image.sh
kjuulh 5eb12bf727
All checks were successful
continuous-integration/drone/push Build is passing
with latest tag
2022-08-14 20:55:56 +02:00

16 lines
340 B
Bash
Executable File

#!/bin/bash
set -e
tag="$REGISTRY/$SERVICE:${COMMIT_SHA:0:10}"
latest_tag="$REGISTRY/$SERVICE:latest"
echo "logging in"
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
echo "building image"
DOCKER_BUILDKIT=1 docker build -t "$tag" -t "$latest_tag" -f "$TMP/build_cuddle_image.Dockerfile" .
echo "pushing image"
docker push "$tag"