docker-kopano/hooks/build

14 lines
494 B
Bash

#!/bin/bash
# hooks/build
# $DOCKER_REPO and $CACHE_TAG are injected into the build environment
case "${CACHE_TAG}" in
"latest-core") bld_target=kopano-core ;;
"latest") bld_target=kopano-full ;;
"latest-debugtools") bld_target=kopano-debugtools ;;
esac
echo "hooks/build called with IMAGE_NAME=${DOCKER_REPO}:${CACHE_TAG}, so we will run:"
echo "docker build --target $bld_target -t ${DOCKER_REPO}:${CACHE_TAG} ."
docker build --target $bld_target -t ${DOCKER_REPO}:${CACHE_TAG} .