Container not starting after creation
See original GitHub issueUbuntu: 14.04 (x64) docker.io: 0.9.1~dfsg1-2 ( docker-py: 0.4.0 (installed via pip)
I’m trying to start a container with docker-py, but c.start(…)
only returns None. This is the test-script I’ve been using:
import docker
from pprint import pprint
c = docker.Client(base_url='unix://var/run/docker.sock',
version="1.10",
timeout=20)
c.version()
print("Images:")
print("======")
pprint(c.images())
my_container = c.create_container('ubuntu', '/bin/bash')
print("my_container:")
print("============")
pprint(my_container)
print("------------------------")
print("trying to start %s" % (my_container['Id'], ))
erg = c.start(my_container['Id'])
print("erg: %s" % (erg, ))
And this is my output. Am I missing something?
Issue Analytics
- State:
- Created 9 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Docker container not starting (docker start) - Stack Overflow
I created the container with the following command:
Read more >Container not getting started after start command issued
Hi, I have just started working with Docker installation and practices through CLI. As a first practice, I have executed the command docker ......
Read more >Failed to start Container after reboot - DevOps Stack Exchange
Starting a new container works fine. How can a fix, it and sould the container not start by itself because of "--restart alway"...
Read more >Debugging docker container that won't start | by suprit shah
Being a developer, the first thing we do is to see the logs and any error code. Using a docker command to see...
Read more >Why Does My Docker Container Stop? - Tutorial Works
If you run a container and it terminates immediately, it is frustrating to figure out what's going on. But fear not. You can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You have to set
tty=True, stdin_open=True,
parameters when create a new container.I am using
tty=True
andstdin_open=True
…… but I have still the problem that the container goes into
exit
after 3 seconds?