{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/28377","repository_url":"https://api.github.com/repos/docker/docker","labels_url":"https://api.github.com/repos/docker/docker/issues/28377/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/28377/comments","events_url":"https://api.github.com/repos/docker/docker/issues/28377/events","html_url":"https://github.com/docker/docker/issues/28377","id":189043483,"number":28377,"title":"Unable to run systemd inside Container","user":{"login":"nmagerko","id":3152067,"avatar_url":"https://avatars.githubusercontent.com/u/3152067?v=3","gravatar_id":"","url":"https://api.github.com/users/nmagerko","html_url":"https://github.com/nmagerko","followers_url":"https://api.github.com/users/nmagerko/followers","following_url":"https://api.github.com/users/nmagerko/following{/other_user}","gists_url":"https://api.github.com/users/nmagerko/gists{/gist_id}","starred_url":"https://api.github.com/users/nmagerko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmagerko/subscriptions","organizations_url":"https://api.github.com/users/nmagerko/orgs","repos_url":"https://api.github.com/users/nmagerko/repos","events_url":"https://api.github.com/users/nmagerko/events{/privacy}","received_events_url":"https://api.github.com/users/nmagerko/received_events","type":"User","site_admin":false},"labels":[{"id":73616520,"url":"https://api.github.com/repos/docker/docker/labels/area/builder","name":"area/builder","color":"fbca04","default":false},{"id":73641990,"url":"https://api.github.com/repos/docker/docker/labels/area/runtime","name":"area/runtime","color":"fbca04","default":false},{"id":182417459,"url":"https://api.github.com/repos/docker/docker/labels/status/more-info-needed","name":"status/more-info-needed","color":"C6A49A","default":false},{"id":375714123,"url":"https://api.github.com/repos/docker/docker/labels/version/1.12","name":"version/1.12","color":"ededed","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-14T07:13:32Z","updated_at":"2016-11-14T15:34:23Z","closed_at":null,"body":"**Description**\r\n\r\nI have an image that adds a systemd service to a container, enables that service, and then finally starts that service with the following command:\r\n```\r\nCMD  [\"systemctl\", \"start\", \"example.service\"]\r\n```\r\n\r\nUnfortunately, whenever I try to run the container, I get an error (see below).\r\n\r\n**Steps to reproduce the issue:**\r\n1. Create a Dockerfile that attempts to start a `systemd` service\r\n2. `..$ docker run -it [tag] /bin/bash` (run the container and drop into bash)\r\n3. `..# journalctl -u example.service` (check logs of service; will not exist)\r\n4. `..# systemctl start example.service` (try to start again; will fail)\r\n\r\n**Describe the results you received:**\r\n```\r\nFailed to get D-Bus connection: Unknown error -1\r\n```\r\n\r\n**Describe the results you expected:**\r\nI expected to see the service I had started in my Dockerfile to be running\r\n\r\n**Additional information you deem important (e.g. issue happens only occasionally):**\r\nIssue #25516 had a problem similar to what I am experiencing. However, when I try to run the command mentioned by @thaJeztah [here](https://github.com/docker/docker/issues/25516#issuecomment-238527775) I get the following result immediately:\r\n\r\n```\r\ndocker: Error response from daemon: invalid header field value \"oci runtime error: container_linux.go:247: starting container process caused \\\"exec: \\\\\\\"--security-opt\\\\\\\": executable file not found in $PATH\\\"\\n\".\r\n```\r\n\r\nThis result occurs consistently. I am not sure which file it is referring to.\r\n\r\n**Output of `docker version`:**\r\n```\r\nClient:\r\n Version:      1.12.3\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   6b644ec\r\n Built:        Wed Oct 26 23:26:11 2016\r\n OS/Arch:      darwin/amd64\r\n\r\nServer:\r\n Version:      1.12.3\r\n API version:  1.24\r\n Go version:   go1.6.3\r\n Git commit:   6b644ec\r\n Built:        Wed Oct 26 23:26:11 2016\r\n OS/Arch:      linux/amd64\r\n```\r\n\r\n**Output of `docker info`:**\r\n```\r\nContainers: 0\r\n Running: 0\r\n Paused: 0\r\n Stopped: 0\r\nImages: 12\r\nServer Version: 1.12.3\r\nStorage Driver: aufs\r\n Root Dir: /var/lib/docker/aufs\r\n Backing Filesystem: extfs\r\n Dirs: 15\r\n Dirperm1 Supported: true\r\nLogging Driver: json-file\r\nCgroup Driver: cgroupfs\r\nPlugins:\r\n Volume: local\r\n Network: host null bridge overlay\r\nSwarm: inactive\r\nRuntimes: runc\r\nDefault Runtime: runc\r\nSecurity Options: seccomp\r\nKernel Version: 4.4.27-moby\r\nOperating System: Alpine Linux v3.4\r\nOSType: linux\r\nArchitecture: x86_64\r\nCPUs: 2\r\nTotal Memory: 1.951 GiB\r\nName: moby\r\nID: O26P:LOJX:KTYW:OAL6:WN5N:K6AJ:XZCT:GU4O:GCA3:FATM:UEBR:ZWXH\r\nDocker Root Dir: /var/lib/docker\r\nDebug Mode (client): false\r\nDebug Mode (server): true\r\n File Descriptors: 21\r\n Goroutines: 34\r\n System Time: 2016-11-14T07:06:53.071173729Z\r\n EventsListeners: 1\r\nNo Proxy: *.local, 169.254/16\r\nRegistry: https://index.docker.io/v1/\r\nWARNING: No kernel memory limit support\r\nInsecure Registries:\r\n 127.0.0.0/8\r\n```\r\n\r\n**Additional environment details (AWS, VirtualBox, physical, etc.):**\r\n- Running MacOS X Sierra\r\n- Building `FROM node:4.6.2`\r\n"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/260367832","html_url":"https://github.com/docker/docker/issues/28377#issuecomment-260367832","issue_url":"https://api.github.com/repos/docker/docker/issues/28377","id":260367832,"user":{"login":"nmagerko","id":3152067,"avatar_url":"https://avatars.githubusercontent.com/u/3152067?v=3","gravatar_id":"","url":"https://api.github.com/users/nmagerko","html_url":"https://github.com/nmagerko","followers_url":"https://api.github.com/users/nmagerko/followers","following_url":"https://api.github.com/users/nmagerko/following{/other_user}","gists_url":"https://api.github.com/users/nmagerko/gists{/gist_id}","starred_url":"https://api.github.com/users/nmagerko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nmagerko/subscriptions","organizations_url":"https://api.github.com/users/nmagerko/orgs","repos_url":"https://api.github.com/users/nmagerko/repos","events_url":"https://api.github.com/users/nmagerko/events{/privacy}","received_events_url":"https://api.github.com/users/nmagerko/received_events","type":"User","site_admin":false},"created_at":"2016-11-14T15:34:23Z","updated_at":"2016-11-14T15:34:23Z","body":"@thaJeztah Yes the ordering of the security option was the problem but the `Unknown error -1` remains. However, reading your comments again, I am now unsure if I do need `systemd`. \r\n\r\nThe reason I wanted to use it in the first place is because I wanted to try to keep the `node` process alive even if an exception/error occurred. There are `node` packages that will allow me to do this, but I wanted to try to use a system utility instead. \r\n\r\nShould I not worry about the process dying? My only concern is that I'll eventually try running this on AWS ECS, and if a container goes down due to an exception, it might take a few seconds to spin up a new one to replace it. I'm probably misunderstanding how this all works, though."}}
{"actor":{"display_login":"nmagerko"}}