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:
Jose Diaz-Gonzalez
2024-09-21 05:35:15 -04:00
parent 8a6c22ad6c
commit 5493ca5978
4 changed files with 10 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ RUN mkdir -p /etc/apt/keyrings \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get -y --no-install-recommends --only-upgrade install openssl openssh-server \
&& apt-get -y --no-install-recommends install rsync "/tmp/dokku-$(dpkg --print-architecture).deb" \
&& DOKKU_INIT_SYSTEM=sv apt-get -y --no-install-recommends install rsync "/tmp/dokku-$(dpkg --print-architecture).deb" \
&& apt-get purge -y syslog-ng-core \
&& apt-get autoremove -y \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*