-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Closed
Milestone
Description
This appears to be a regression in Docker 1.7.0: if a container's Entrypoint is specified as a string and not an array of strings, the Docker API returns an error, regardless of the API version specified. It seems to be adding quotes around the executable name, e.g. so it's searching for "echo" instead of echo.
Test script using docker-py:
# To run:
# $ docker pull busybox
# $ python test.py
from docker.utils import kwargs_from_env
from docker import Client
kwargs = kwargs_from_env()
kwargs['tls'].assert_hostname = False
client = Client(**kwargs)
c = client.create_container('busybox', ['hello', 'world'], entrypoint='echo')
client.start(c)Against Docker 1.6.2, the script runs fine and exits with code 0.
Against Docker 1.7.0, it raises an exception:
Traceback (most recent call last):
File "test.py", line 12, in <module>
client.start(c)
File "/Users/aanand/.virtualenvs/docker-bug/lib/python2.7/site-packages/docker/utils/decorators.py", line 15, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/Users/aanand/.virtualenvs/docker-bug/lib/python2.7/site-packages/docker/client.py", line 1076, in start
self._raise_for_status(res)
File "/Users/aanand/.virtualenvs/docker-bug/lib/python2.7/site-packages/docker/client.py", line 122, in _raise_for_status
raise errors.APIError(e, response, explanation=explanation)
docker.errors.APIError: 404 Client Error: Not Found ("Cannot start container e4a84f4c3f9ad749a0d186e465d5e6a460d2f32d8e816b641972767a9439c05e: [8] System error: exec: "\"echo\"": executable file not found in $PATH")
Reactions are currently unavailable