-
-
Notifications
You must be signed in to change notification settings - Fork 464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker run and detach #106
Comments
It seems that the Docker.prototype.run (from docker.js) method attach to the new created container and thus, wait until the container exit which is not my expected behavior. When a container is started, I need to be notified it has started, that's it. As a work around, I have commented out all "container.attach" method line 390. Is there a better approach ?
Thank you src: http://stackoverflow.com/questions/17776415/what-is-equivalent-remote-api-command-to-docker-run-d |
Sure there is. Do your own container lifecycle.
|
Check the examples, like: https://github.com/apocas/dockerode/blob/master/examples/exec_running_container.js |
Perfect thank you very much |
How can we return the Container ID if the whole code in the above example was part of a function and that function is called to Spin up a container? If not the Container Id, Then at least some status code would do. Please help. |
Hi,
I am trying to docker.run an image in detached mode. In docker command I am using:
I can then see in "STATUS" column (docker ps -a on the host) that the container is Up and running.
Trying to do the same thing with the API
When I check with docker ps -a the container is up and running but It never goes in the callback even though detach = true.
I tried to add the option Tty: false to the list of options above
It goes in the callback but the status of the container is "Exited (0) 4 seconds ago "
Any idea to keep my container up and running in detach mode with the API ?
Thanks
The text was updated successfully, but these errors were encountered: