Skip to content

Commit 003d757

Browse files
committed
Test updating systemd dependency
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 67601c4 commit 003d757

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff 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
367369
RUN ssh-keygen -q -t rsa -f /root/.ssh/id_rsa -N '' && \
368370
useradd -m -s /bin/bash rootless && \

Dockerfile.d/test-integration-rootless.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ if [[ "$(id -u)" = "0" ]]; then
3434
systemctl start ssh
3535
exec ssh -o StrictHostKeyChecking=no rootless@localhost "$0" "$@"
3636
else
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'

0 commit comments

Comments
 (0)