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

Doesn't detect Docker Rootless #4

Open
fenollp opened this issue Jan 26, 2024 · 1 comment
Open

Doesn't detect Docker Rootless #4

fenollp opened this issue Jan 26, 2024 · 1 comment

Comments

@fenollp
Copy link

fenollp commented Jan 26, 2024

No description provided.

@llamaha
Copy link

llamaha commented Jul 3, 2024

I'm unable to reproduce this. I'm running Docker in rootless mode. It will check for a .dockerenv file in the root and mine is there. It does a second check for the string "docker" in /proc/self/cgroup and that is there too.

How did you install docker rootless? Is there anything special about your configuration?

$ docker info | grep rootless-mode
WARNING: Running in rootless-mode without cgroups. To enable cgroups in rootless-mode, you need to boot the system in cgroup v2 mode.

$ docker run -it is_docker bash
root@8fa6c2872024:/# cargo run --example main
Currently in a Docker Container!

root@8fa6c2872024:/# ls -l .dockerenv 
-rwxr-xr-x 1 root root 0 Jul  3 09:12 .dockerenv

root@8fa6c2872024:/# grep docker /proc/self/cgroup
1:name=systemd:/user.slice/user-1000.slice/user@1000.service/docker.service/8fa6c28720242abf9fbeac968d7c27c482a79a623ec7c8c2e2140139f7d32071
0::/user.slice/user-1000.slice/user@1000.service/docker.service

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