Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Stop container before destroying it
Browse files Browse the repository at this point in the history
[#82596896]
  • Loading branch information
luan committed Nov 24, 2014
1 parent 6c575e6 commit a20c4e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions warden/lib/warden/container/insecure.rb
Expand Up @@ -33,6 +33,7 @@ def do_stop(request, response)
end

def do_destroy(request, response)
sh File.join(root_path, "stop.sh"), container_path, "-w", "0", raise: false
sh File.join(root_path, "destroy.sh"), container_path
logger.debug("Container destroyed")
end
Expand Down
1 change: 1 addition & 0 deletions warden/lib/warden/container/linux.rb
Expand Up @@ -120,6 +120,7 @@ def do_stop(request, response)
end

def do_destroy(request, response)
sh File.join(root_path, "stop.sh"), container_path, "-w", "0", raise: false
sh File.join(root_path, "destroy.sh"), container_path
logger.debug("Container destroyed")

Expand Down

0 comments on commit a20c4e8

Please sign in to comment.