Page MenuHome

build_docker_img.sh
No OneTemporary

File Metadata

Created
Fri, Oct 18, 8:46 AM

build_docker_img.sh

#!/bin/bash -e
DEPLOY_BRANCH=${DEPLOY_BRANCH:-production}
DOCKER_TAG="armadillica/blender-mydata"
PROJECT_NAME="mydata"
# macOS does not support readlink -f, so we use greadlink instead
if [[ `uname` == 'Darwin' ]]; then
command -v greadlink 2>/dev/null 2>&1 || { echo >&2 "Install greadlink using brew."; exit 1; }
readlink='greadlink'
else
readlink='readlink'
fi
MY_DIR="$(dirname "$($readlink -f "$0")")"
cd "$MY_DIR"
docker build . -t $DOCKER_TAG
echo
echo "==================================================================="
echo "Docker image of ${PROJECT_NAME} is complete."
echo "==================================================================="
echo -n "Press [ENTER] to push to Docker Hub..."
read dummy
docker push $DOCKER_TAG
echo
echo "Done"

Event Timeline