2015-08-05 23:26:34 +00:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
set -x
|
|
|
|
|
2015-08-18 00:00:58 +00:00
|
|
|
DOCKER_GRAPHDRIVER=${DOCKER_GRAPHDRIVER:-overlay}
|
|
|
|
EXEC_DRIVER=${EXEC_DRIVER:-native}
|
|
|
|
|
2015-08-05 23:26:34 +00:00
|
|
|
# Set IP address in /etc/hosts for localregistry
|
|
|
|
IP=$(ifconfig eth0|grep "inet addr:"| cut -d: -f2 | awk '{ print $1}')
|
|
|
|
echo "$IP localregistry" >> /etc/hosts
|
|
|
|
|
|
|
|
sh install_certs.sh localregistry
|
|
|
|
|
2016-01-05 00:32:12 +00:00
|
|
|
DOCKER_VERSION=$(docker --version | cut -d ' ' -f3 | cut -d ',' -f1)
|
|
|
|
major=$(echo "$DOCKER_VERSION"| cut -d '.' -f1)
|
|
|
|
minor=$(echo "$DOCKER_VERSION"| cut -d '.' -f2)
|
|
|
|
|
|
|
|
daemonOpts="daemon"
|
|
|
|
if [ $major -le 1 ] && [ $minor -lt 9 ]; then
|
|
|
|
daemonOpts="--daemon"
|
|
|
|
fi
|
|
|
|
|
|
|
|
docker $daemonOpts --log-level=debug --storage-driver="$DOCKER_GRAPHDRIVER"
|