Move build stuff from hassio repo

This commit is contained in:
pvizeli 2017-04-06 11:51:00 +02:00
parent 0e7b6c87d2
commit 40c74ce748
41 changed files with 1645 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#!/bin/bash
set -ev
DOCKER_REPO=pvizeli
DOCKER_IMAGE=docker-build-env
# Get the absolute script location
pushd `dirname $0` > /dev/null 2>&1
SCRIPTPATH=`pwd`
popd > /dev/null 2>&1
# Sanity checks
if [ "$#" -ne 1 ]; then
echo "Usage: create_build_env.sh [<TAG> | NONE]"
exit 1
fi
DOCKER_TAG=$1
# Build
docker build --pull --tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} -f ${SCRIPTPATH}/Dockerfile ${SCRIPTPATH}
# Tag
docker tag ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG} ${DOCKER_REPO}/${DOCKER_IMAGE}:latest
if [ ${DOCKER_TAG} != "NONE" ]; then
# push
docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:${DOCKER_TAG}
docker push ${DOCKER_REPO}/${DOCKER_IMAGE}:latest
fi