dockerd-rootless-setuptool.shでsystemd not detectedが発生する
作成日: ・ 更新日:
dockerd-rootless-setuptool.shで、一般ユーザにdockerdをインストールさせようと思ったらエラーが出てしまったので原因追及(TODO)
$ dockerd-rootless-setuptool.sh install
[INFO] systemd not detected, dockerd-rootless.sh needs to be started manually:
PATH=/usr/bin:/sbin:/usr/sbin:$PATH dockerd-rootless.sh
[INFO] CLI context "rootless" already exists
[INFO] Using CLI context "rootless"
Current context is now "rootless"
[INFO] Make sure the following environment variable(s) are set (or add them to ~/.bashrc):
# WARNING: systemd not found. You have to remove XDG_RUNTIME_DIR manually on every logout.
export XDG_RUNTIME_DIR=/home/user/.docker/run
export PATH=/usr/bin:$PATH
[INFO] Some applications may require the following environment variable too:
export DOCKER_HOST=unix:///home/user/.docker/run/docker.sock
原因はsuでアカウントを切り替えたうえで実行していたから
ssh等で直接ログインした際にはエラーが発生しない