Files
unifi/build_unifi.sh
Tommi2Day 669dd83b62 Update Base to Ubuntu 16.04
disable ipv6 internally
2016-10-17 20:34:30 +02:00

17 lines
468 B
Bash

#!/bin/bash
VERSION=5.2.9
VMNAME=${1:-unifi5}
if [ -r Dockerfile.$VMNAME ]; then
DOCKER_USER=${DOCKER_USER:-tommi2day}
#build the container
docker stop $VMNAME
docker rm $VMNAME
docker build -t $DOCKER_USER/$VMNAME:$VERSION -f Dockerfile.$VMNAME . |tee build.log
IMAGE=$(awk '/^Successfully/ {print $3}' build.log)
if [ -n "$IMAGE" ]; then
docker tag $IMAGE $DOCKER_USER/$VMNAME:latest
fi
else
echo "Usage: $0 VMNAME #Dockerfile.VMNAME must exists"
fi