Skip to content
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

Unstoppable container #284

Closed
xmik opened this issue Mar 18, 2015 · 0 comments
Closed

Unstoppable container #284

xmik opened this issue Mar 18, 2015 · 0 comments

Comments

@xmik
Copy link
Contributor

xmik commented Mar 18, 2015

After any container is deployed with chef-docker cookbook using:

docker_container 'my_container' do
  container_name 'my_container'
  image 'my_image'
  tty true
  detach true
  action :run
end

stopping it later manually (outside the cookbook) is impossible. I tried those commands:

docker stop my_container
sv stop my_container

Actually the latter command should be used, to make it work the following script is needed: /etc/service/my_container/finish with contents:

#!/bin/bash

docker stop my_container

I think a finish script should be generated each time a docker container is created.

@bflad bflad closed this as completed in 7de375e Apr 14, 2015
bflad added a commit that referenced this issue Apr 14, 2015
fixes #284, runit finish script to stop a container
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant