Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docker Rootless] systemd not detected (docker-ce-rootless-extras) #326

Open
iocron opened this issue Dec 9, 2022 · 1 comment
Open

Comments

@iocron
Copy link

iocron commented Dec 9, 2022

OS: Ubuntu 22.04.1 LTS
Installed packages (apt-get): uidmap and docker-ce-rootless-extras
Running Command: dockerd-rootless-setuptool.sh install
Results in:

[INFO] systemd not detected, dockerd-rootless.sh needs to be started manually:

PATH=/home/valheim/bin:/sbin:/usr/sbin:$PATH dockerd-rootless.sh

[INFO] CLI context "rootless" already exists
[INFO] Use CLI context "rootless"
Current context is now "rootless"

[INFO] Make sure the following environment variables are set (or add them to ~/.bashrc):

export PATH=/home/valheim/bin:$PATH
Some applications may require the following environment variable too:
export DOCKER_HOST=unix:///home/valheim/.docker/run/docker.sock

I've tested nearly all variations to work around it. E.g. setting export variables beforehand, setting them on runtime, giving the user all kinds of permissions, using loginctl enable-linger, etc. But none seems to work. The only way I was beeing able to make it work was the following:

XDG_RUNTIME_DIR=/home/valheim/.docker/run curl -fsSL https://get.docker.com/rootless | s
@AkihiroSuda
Copy link
Contributor

Explained in https://rootlesscontaine.rs/getting-started/common/login/

The $XDG_RUNTIME_DIR environmental variable is set when:

  • Logged in as a non-root user via the graphic console .
  • Logged in as a non-root user via ssh <user>@<hostname> .
  • Logged in as the root, and then switched to a non-root user via machinectl shell <user>@ .

The environmental variable is not set when:

  • Logged in as the root, and then switched to a non-root user via su -l <user>
  • Logged in as the root, and then switched to a non-root user via sudo -u <user>
  • Logged in as the root, and then switched to a non-root user via ksu <user>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants