{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker-py/issues/672","labels_url":"https://api.github.com/repos/docker/docker-py/issues/672/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker-py/issues/672/comments","events_url":"https://api.github.com/repos/docker/docker-py/issues/672/events","html_url":"https://github.com/docker/docker-py/issues/672","id":94058841,"number":672,"title":"create_container with entrypoint is double escaped","user":{"login":"omribahumi","id":2558457,"avatar_url":"https://avatars.githubusercontent.com/u/2558457?v=3","gravatar_id":"","url":"https://api.github.com/users/omribahumi","html_url":"https://github.com/omribahumi","followers_url":"https://api.github.com/users/omribahumi/followers","following_url":"https://api.github.com/users/omribahumi/following{/other_user}","gists_url":"https://api.github.com/users/omribahumi/gists{/gist_id}","starred_url":"https://api.github.com/users/omribahumi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omribahumi/subscriptions","organizations_url":"https://api.github.com/users/omribahumi/orgs","repos_url":"https://api.github.com/users/omribahumi/repos","events_url":"https://api.github.com/users/omribahumi/events{/privacy}","received_events_url":"https://api.github.com/users/omribahumi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-09T14:07:39Z","updated_at":"2015-07-09T14:13:26Z","closed_at":"2015-07-09T14:12:41Z","body":"```python\r\n$ pip freeze | grep -i docker\r\ndocker-py==1.2.3\r\n$ cat bug.py\r\nfrom docker import Client\r\nfrom docker.utils import kwargs_from_env\r\n\r\nclient = Client(version='auto', **kwargs_from_env())\r\ncontainer = client.create_container('ubuntu:14.04', entrypoint='/bin/sh')\r\nclient.start(container=container['Id'])\r\n$ python bug.py\r\nTraceback (most recent call last):\r\n  File \"bug.py\", line 6, in <module>\r\n    client.start(container=container['Id'])\r\n  File \"/Users/omrib/git/stabber/env/lib/python2.7/site-packages/docker/utils/decorators.py\", line 15, in wrapped\r\n    return f(self, resource_id, *args, **kwargs)\r\n  File \"/Users/omrib/git/stabber/env/lib/python2.7/site-packages/docker/client.py\", line 1076, in start\r\n    self._raise_for_status(res)\r\n  File \"/Users/omrib/git/stabber/env/lib/python2.7/site-packages/docker/client.py\", line 122, in _raise_for_status\r\n    raise errors.APIError(e, response, explanation=explanation)\r\ndocker.errors.APIError: 404 Client Error: Not Found (\"Cannot start container d00ac5da33c7e0f01a3f04435566c9d48d8acf40b51637aba5f31e97cd44d909: [8] System error: exec: \"\\\"/bin/sh\\\"\": stat \"/bin/sh\": no such file or directory\")\r\n```\r\n\r\n`docker inspect` on the container yields:\r\n```javascript\r\n// ...\r\n        \"Entrypoint\": [\r\n            \"\\\"/bin/sh\\\"\"\r\n        ],\r\n// ...\r\n```\r\n\r\nAs you can see, it looks double-escaped. Not sure why.\r\nWhen creating the same container with the docker CLI things are ok:\r\n```\r\n$ docker create --entrypoint /bin/sh ubuntu:14.04\r\nffd55d6cda782c87ceb41d754db424c462b5bbb0731ce3f011805a04184d577b\r\n$ docker inspect ffd55d6cda782c87ceb41d754db424c462b5bbb0731ce3f011805a04184d577b\r\n// ...\r\n        \"Entrypoint\": [\r\n            \"/bin/sh\"\r\n        ],\r\n// ...\r\n```\r\n\r\nI'm using docker 1.7.0 with boot2docker on OSX:\r\n```\r\nClient version: 1.7.0\r\nClient API version: 1.19\r\nGo version (client): go1.4.2\r\nGit commit (client): 0baf609\r\nOS/Arch (client): darwin/amd64\r\nServer version: 1.7.0\r\nServer API version: 1.19\r\nGo version (server): go1.4.2\r\nGit commit (server): 0baf609\r\nOS/Arch (server): linux/amd64\r\n```"},"comment":{"url":"https://api.github.com/repos/docker/docker-py/issues/comments/119995987","html_url":"https://github.com/docker/docker-py/issues/672#issuecomment-119995987","issue_url":"https://api.github.com/repos/docker/docker-py/issues/672","id":119995987,"user":{"login":"aanand","id":1062,"avatar_url":"https://avatars.githubusercontent.com/u/1062?v=3","gravatar_id":"","url":"https://api.github.com/users/aanand","html_url":"https://github.com/aanand","followers_url":"https://api.github.com/users/aanand/followers","following_url":"https://api.github.com/users/aanand/following{/other_user}","gists_url":"https://api.github.com/users/aanand/gists{/gist_id}","starred_url":"https://api.github.com/users/aanand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aanand/subscriptions","organizations_url":"https://api.github.com/users/aanand/orgs","repos_url":"https://api.github.com/users/aanand/repos","events_url":"https://api.github.com/users/aanand/events{/privacy}","received_events_url":"https://api.github.com/users/aanand/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T14:13:26Z","updated_at":"2015-07-09T14:13:26Z","body":"You can work around it for now by passing `entrypoint` as a list, e.g. `entrypoint=['/bin/sh']`"}}