-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
[Question] Conditional Stopping of Docker Containers #71
Comments
already does the behavior you mentioned to make writing your cookbooks easy. Here's the code in case you're more curious: https://github.com/bflad/chef-docker/blob/master/providers/container.rb#L96 Let me know if you have additional questions or if its not behaving as expected. |
I just tried this: docker_container "#{app.name}" do It doesn't appear to be working as I would expect. Here's the output I got from the test:
|
Which OS are you on? |
Debian 7, Linux app3 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux |
Ah yeah, Debian uses SysV (init_type sysv in this cookbook) by default. Although the docker_container sysv script is there, no one has contributed an init script for the daemon yet (guess I'll add this to my to-do list tonight). If you're stuck on using Upstart, I believe you need to install the Debian |
Thanks for the good information. I am a bit hesitant on adding in upstart when I am planning on using runit, which goes along with issue #72 . Any chance you could incorporate runit into the list for docker functionalities? Thanks. |
I'm looking at all the runit documentation now. Should have an initial runit setup hopefully tonight. |
Thanks man! Definitely looking forward to it! |
I was wondering how to conditionally stop a docker container. I have a deployment process that I am writing that needs to stop a running docker container if it is running or if it is not running, then it should cleanly exit and continue on.
I tried something like this:
But that didn't seem to work. I am really new to using Chef and Ruby in general, so any help or step in the right direction would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: