{"action":"created","issue":{"url":"https://api.github.com/repos/elogind/elogind/issues/52","repository_url":"https://api.github.com/repos/elogind/elogind","labels_url":"https://api.github.com/repos/elogind/elogind/issues/52/labels{/name}","comments_url":"https://api.github.com/repos/elogind/elogind/issues/52/comments","events_url":"https://api.github.com/repos/elogind/elogind/issues/52/events","html_url":"https://github.com/elogind/elogind/issues/52","id":310063659,"number":52,"title":"elogind in docker container","user":{"login":"mviereck","id":14821372,"avatar_url":"https://avatars0.githubusercontent.com/u/14821372?v=4","gravatar_id":"","url":"https://api.github.com/users/mviereck","html_url":"https://github.com/mviereck","followers_url":"https://api.github.com/users/mviereck/followers","following_url":"https://api.github.com/users/mviereck/following{/other_user}","gists_url":"https://api.github.com/users/mviereck/gists{/gist_id}","starred_url":"https://api.github.com/users/mviereck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mviereck/subscriptions","organizations_url":"https://api.github.com/users/mviereck/orgs","repos_url":"https://api.github.com/users/mviereck/repos","events_url":"https://api.github.com/users/mviereck/events{/privacy}","received_events_url":"https://api.github.com/users/mviereck/received_events","type":"User","site_admin":false},"labels":[{"id":476872673,"url":"https://api.github.com/repos/elogind/elogind/labels/invalid","name":"invalid","color":"e6e6e6","default":true},{"id":597799749,"url":"https://api.github.com/repos/elogind/elogind/labels/need%20information","name":"need information","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-03-30T13:16:00Z","updated_at":"2018-04-12T16:14:28Z","closed_at":"2018-04-12T16:14:28Z","author_association":"NONE","body":"I did some tests with SysVinit (devuan) in docker containers.\r\n\r\nTo allow everything that may be needed I shared `/sys/fs/cgroup` with docker container and added capabilty `SYS_ADMIN`.\r\n\r\nThe init startup reports `[ ok ] Starting session management daemon: elogind.`. \r\nBut it is not present in `pstree`.\r\nIf I try to manually start elogind, I get:\r\n```\r\nroot@9098d1f0600c:~# elogind\r\nFailed to mount cgroup at /sys/fs/cgroup/elogind: No such file or directory\r\nOut of memory.\r\nroot@9098d1f0600c:~# mkdir -p /sys/fs/cgroup/elogind\r\nmkdir: cannot create directory '/sys/fs/cgroup/elogind': Read-only file system\r\n```\r\nI admit I am not familar with the cgroup concept and I am not sure how much elogind depends on it.\r\nThough, I would like to get it work in a docker container environment. \r\n\r\n(I also tried to compile elogind with different `--with-cgroup-controller` values, but my builds fail so far. I have to check that out further.)\r\n\r\nFeature request: \r\nCould elogind detect that it runs in a container environment and disable cgroup usage on its own? One possibility would be to look for environment variable `container=docker`. At least OpenRC and systemd regard this.\r\n\r\n_(Edit: btw., if I run `systemd` in a docker container, `logind` works well. I assume systemd handles cgroups in a different way, and/or logind if configured different.)_"},"comment":{"url":"https://api.github.com/repos/elogind/elogind/issues/comments/380861289","html_url":"https://github.com/elogind/elogind/issues/52#issuecomment-380861289","issue_url":"https://api.github.com/repos/elogind/elogind/issues/52","id":380861289,"user":{"login":"Yamakuzure","id":1118655,"avatar_url":"https://avatars2.githubusercontent.com/u/1118655?v=4","gravatar_id":"","url":"https://api.github.com/users/Yamakuzure","html_url":"https://github.com/Yamakuzure","followers_url":"https://api.github.com/users/Yamakuzure/followers","following_url":"https://api.github.com/users/Yamakuzure/following{/other_user}","gists_url":"https://api.github.com/users/Yamakuzure/gists{/gist_id}","starred_url":"https://api.github.com/users/Yamakuzure/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yamakuzure/subscriptions","organizations_url":"https://api.github.com/users/Yamakuzure/orgs","repos_url":"https://api.github.com/users/Yamakuzure/repos","events_url":"https://api.github.com/users/Yamakuzure/events{/privacy}","received_events_url":"https://api.github.com/users/Yamakuzure/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T16:14:28Z","updated_at":"2018-04-12T16:14:28Z","author_association":"COLLABORATOR","body":"I am closing this, as it seems to be a configuration problem.\r\n\r\nPlease feel free to reopen this issue if you have a setup that should work but doesn't. Please be aware that I do not have any viable experience with containers. I'd need detailed information. But if I can improve elogind within containers, don't hesitate to tell me."}}
{"actor":{"display_login":"Yamakuzure"}}