mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-01-17 10:19:47 +00:00
Merge pull request #180 from resin-io/fix-docker-root
Fix entry.sh when DOCKER_ROOT isn't set
This commit is contained in:
commit
dc4f7a7583
@ -1,3 +1,5 @@
|
|||||||
|
* Fix entry.sh when DOCKER_ROOT isn't set [Page]
|
||||||
|
|
||||||
# v1.11.4
|
# v1.11.4
|
||||||
|
|
||||||
* Cleanup docker images if delta failed [petrosagg]
|
* Cleanup docker images if delta failed [petrosagg]
|
||||||
|
@ -23,6 +23,16 @@ fi
|
|||||||
|
|
||||||
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket"
|
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket"
|
||||||
|
|
||||||
|
# If DOCKER_ROOT isn't set then default it
|
||||||
|
if [ -z "${DOCKER_ROOT}" ]; then
|
||||||
|
DOCKER_ROOT=/mnt/root/var/lib/rce
|
||||||
|
fi
|
||||||
|
# Mount the DOCKER_ROOT path equivalent in the container fs
|
||||||
|
DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root}
|
||||||
|
if [ ! -d "${DOCKER_LIB_PATH}" ]; then
|
||||||
|
ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
supervisorctl -c /etc/supervisor/supervisord.conf start resin-supervisor
|
supervisorctl -c /etc/supervisor/supervisord.conf start resin-supervisor
|
||||||
|
11
entry.sh
11
entry.sh
@ -25,9 +25,14 @@ fi
|
|||||||
|
|
||||||
export DBUS_SYSTEM_BUS_ADDRESS="unix:path=/mnt/root/run/dbus/system_bus_socket"
|
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 DOCKER_ROOT isn't set then default it
|
||||||
if [ ! -d /var/lib/docker ]; then
|
if [ -z "${DOCKER_ROOT}" ]; then
|
||||||
ln -s "$DOCKER_ROOT" /var/lib/docker
|
DOCKER_ROOT=/mnt/root/var/lib/rce
|
||||||
|
fi
|
||||||
|
# Mount the DOCKER_ROOT path equivalent in the container fs
|
||||||
|
DOCKER_LIB_PATH=${DOCKER_ROOT#/mnt/root}
|
||||||
|
if [ ! -d "${DOCKER_LIB_PATH}" ]; then
|
||||||
|
ln -s "${DOCKER_ROOT}" "${DOCKER_LIB_PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user