symlink docker root to default path if not already there

docker-delta uses the docker API to query the docker root location.
However, docker returns the path in the host, not the path that it
happens to be bind mounted in the supervisor container. So in order for
the deltas to work properly, these paths must be the same.

Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
This commit is contained in:
Petros Angelatos 2016-06-09 05:15:24 +00:00
parent 30457c0e0f
commit af32a48db4

View File

@ -25,6 +25,11 @@ fi
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket"
# If docker data directory isn't mounted in the default path, symlink it
if [ ! -d /var/lib/docker ]; then
ln -s "$DOCKER_ROOT" /var/lib/docker
fi
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
supervisorctl start resin-supervisor