docker-kopano/hooks/build

20 lines
573 B
Bash

#!/bin/bash
# hooks/build
# $DOCKER_REPO and $DOCKER_TAG are injected into the build environment
echo "hooks/build called with IMAGE_NAME=${DOCKER_REPO}:${DOCKER_TAG}, so we will run:"
#printenv
case "${DOCKER_TAG}" in
core) bld_target=core ;;
full) bld_target=full ;;
webapp) bld_target=core-webapp ;;
*)
echo "NOTHING since we do not know how to build with tag=${DOCKER_TAG}"
exit 1
;;
esac
echo "docker build --target $bld_target -t ${DOCKER_REPO}:${DOCKER_TAG} ."
docker build --target $bld_target -t ${DOCKER_REPO}:${DOCKER_TAG} .