0

I am trying to use docker-py to run docker exec. But, it's returning Killed(after about an hour).

>>> import docker
>>> client = docker.DockerClient(version = "auto", base_url = "")
>>> client.containers.get("container_name").exec_run("start")
    Killed

Can't understand why this is happening? Any ideas? Thanks!

Shafi
  • 11
  • 2
  • which version of docker are you using? Add the output of `docker version` to your question – Tarun Lalwani Jul 26 '17 at 06:34
  • Version: 17.05.0-ce – Shafi Jul 28 '17 at 19:27
  • What does the start process do? May be it is actually getting killed? I am on 17.06 and a normal sleep process works for me fine – Tarun Lalwani Jul 29 '17 at 04:45
  • The start is suppose to start the services for a running container. So, if I have a ubuntu container up and running start is suppose to start a session inside the container – Shafi Aug 02 '17 at 03:08
  • does the command work normally when you attach using `docker exec -it bash` and execute `start`? – Tarun Lalwani Aug 02 '17 at 07:36
  • Yes that works completely fine, but its the docker-py that's causing the problem. – Shafi Aug 02 '17 at 16:29
  • Seem like you are also using the old client. `pip uninstall docker-py` and `pip install docker`. Do this. Some code changes also needed for you – Tarun Lalwani Aug 02 '17 at 16:30
  • O/P of pip list - docker (2.4.2) docker-pycreds (0.2.1) I think that's the latest. I can't understand the reason why it's returning Killed. If I know that, I can start from there. – Shafi Aug 02 '17 at 17:04
  • No obvious reasons that come to my mind right now – Tarun Lalwani Aug 02 '17 at 17:10

0 Answers0