File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -363,6 +363,8 @@ RUN apt-get update -qq && apt-get install -qq --no-install-recommends \
363363 uidmap \
364364 openssh-server \
365365 openssh-client
366+ # Enable D-Bus user session for systemd healthcheck timers in rootless mode
367+ RUN systemctl --global enable dbus.socket dbus.service
366368# TODO: update containerized-systemd to enable sshd by default, or allow `systemctl wants <TARGET> ssh` here
367369RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
368370 useradd -m -s /bin/bash rootless && \
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ if [[ "$(id -u)" = "0" ]]; then
3434 systemctl start ssh
3535 exec ssh -o StrictHostKeyChecking=no rootless@localhost " $0 " " $@ "
3636else
37+ # Start D-Bus user session for systemd healthcheck timers
38+ systemctl --user start dbus.socket dbus.service || true
39+ export DBUS_SESSION_BUS_ADDRESS=" unix:path=$XDG_RUNTIME_DIR /bus"
40+
3741 containerd-rootless-setuptool.sh install
3842 if grep -q " options use-vc" /etc/resolv.conf; then
3943 containerd-rootless-setuptool.sh nsenter -- sh -euc ' echo "options use-vc" >>/etc/resolv.conf'
You can’t perform that action at this time.
0 commit comments