fix: force sv usage in docker container to avoid cases where systemd is used instead
On newer Ubuntu Noble, cron (among other things) has a transitory dependency on systemd, forcing our systemd/runit detection to fail. This change allows overriding the detected init on Ubuntu systems, ensuring we always do the right thing when interacting with init.
This commit is contained in:
@@ -71,13 +71,13 @@ main() {
|
||||
dokku --quiet domains:set-global "$DOKKU_HOSTNAME"
|
||||
fi
|
||||
|
||||
touch /etc/default/dokku
|
||||
echo "export DOKKU_INIT_SYSTEM=sv" >>/etc/default/dokku
|
||||
if [[ -x /usr/local/bin/docker ]]; then
|
||||
mkdir -p /home/dokku/.dokkurc
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >"/home/dokku/.dokkurc/DOCKER_BIN"
|
||||
echo "export DOCKER_BIN=/usr/local/bin/docker" >>/etc/default/dokku
|
||||
fi
|
||||
|
||||
if [[ -n "$DOKKU_HOST_ROOT" ]]; then
|
||||
touch /etc/default/dokku
|
||||
echo "export DOKKU_HOST_ROOT=$DOKKU_HOST_ROOT" >>/etc/default/dokku
|
||||
chown dokku:dokku /etc/default/dokku
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user