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

Commit

Permalink
Merge pull request #464 from projectatomic/revert-457-remove-docker-c…
Browse files Browse the repository at this point in the history
…ontainers-on-stop

Revert "Remove container on stopping on Docker provider. Fixes #389"
  • Loading branch information
dustymabe committed Dec 16, 2015
2 parents e55ef71 + bd97336 commit deddb4c
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions atomicapp/providers/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,9 @@ def undeploy(self):
else:
m = re.match("%s_+%s+_+[a-zA-Z0-9]{12}" % (self.namespace, self.image), container)
if m:
logger.info("STOPPING AND REMOVING CONTAINER: %s", container)
cmd_list = [
["docker", "kill", container],
["docker", "rm", container]
]
logger.info("STOPPING CONTAINER: %s", container)
cmd = ["docker", "kill", container]
if self.dryrun:
logger.info(
"DRY-RUN: STOPPING CONTAINER %s", " ".join(
cmd_list[0]))
logger.info(
"DRY-RUN: REMOVING CONTAINER %s", " ".join(
cmd_list[1]))
logger.info("DRY-RUN: STOPPING CONTAINER %s", " ".join(cmd))
else:
for cmd in cmd_list:
subprocess.check_call(cmd)
subprocess.check_call(cmd)

0 comments on commit deddb4c

Please sign in to comment.