This repository has been archived on 2023-02-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-my-data/docker/build_docker_img.sh
Sybren A. Stüvel bb61c93773 Reworked Docker image into two parts
This is the same approach as used in the Blender Dev Fund site. The
heavy/time-consuming installation of dependencies is done in the base image,
and the project files are contained in the final image.
2018-11-06 17:40:42 +01:00

40 lines
887 B
Bash
Executable File

#!/bin/bash -e
# 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"
source ./settings.sh
case "$1" in
full)
docker build --file Dockerfile.base . -t ${DOCKER_TAG}-base
;;
quick)
;;
*)
echo "Usage: $0 quick|full" >&2
exit 3
;;
esac
docker build . -t $DOCKER_TAG
echo
echo "==================================================================="
echo "Docker image of mydata is complete."
echo "==================================================================="
echo -n "Press [ENTER] to push to Docker Hub..."
read dummy
docker push $DOCKER_TAG
echo
echo "Done"