{"action":"closed","issue":{"url":"https://api.github.com/repos/groupon/DotCi/issues/172","labels_url":"https://api.github.com/repos/groupon/DotCi/issues/172/labels{/name}","comments_url":"https://api.github.com/repos/groupon/DotCi/issues/172/comments","events_url":"https://api.github.com/repos/groupon/DotCi/issues/172/events","html_url":"https://github.com/groupon/DotCi/issues/172","id":111203999,"number":172,"title":"Docker Compose builds are leaking containers in one case","user":{"login":"srlochen","id":1380148,"avatar_url":"https://avatars.githubusercontent.com/u/1380148?v=3","gravatar_id":"","url":"https://api.github.com/users/srlochen","html_url":"https://github.com/srlochen","followers_url":"https://api.github.com/users/srlochen/followers","following_url":"https://api.github.com/users/srlochen/following{/other_user}","gists_url":"https://api.github.com/users/srlochen/gists{/gist_id}","starred_url":"https://api.github.com/users/srlochen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/srlochen/subscriptions","organizations_url":"https://api.github.com/users/srlochen/orgs","repos_url":"https://api.github.com/users/srlochen/repos","events_url":"https://api.github.com/users/srlochen/events{/privacy}","received_events_url":"https://api.github.com/users/srlochen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-13T15:23:10Z","updated_at":"2016-01-04T03:13:30Z","closed_at":"2016-01-04T03:13:30Z","body":"We've seen one case where a Docker compose build was leaking containers that were not cleaned up after the builds finished. These containers continued to hang around, and overtime accumulated so much that they choked the build host for resources.\r\n\r\nIn the one case we saw, the job orchestrated a numbed of containers with Docker Compose, but only one container stuck around. In this case it appeared that the build was trying to kill the container but was  using the wrong string for the container name. The build showed the following command:\r\n\r\n`trap \"docker-compose -f docker-compose.yml -p cibackbeatbackbeatserver274 kill; docker-compose -f docker-compose.yml -p cibackbeatbackbeatserver274 rm -v --force; exit\" PIPE QUIT INT HUP EXIT TERM`\r\n\r\nBut the host on which it was running had the following container:\r\n`# docker ps\r\nCONTAINER ID        IMAGE                                                                      COMMAND                CREATED             STATUS              PORTS                   NAMES\r\n2fff59259659        cibackbeatbackbeatserver274_ci                                             \"bin/run-tests.sh\"     4 minutes ago       Up 15 seconds`\r\n\r\n\r\nNote the difference between `cibackbeatbackbeatserver274 ` and `cibackbeatbackbeatserver274_ci `\r\n\r\nWe need to close this gap so containers don't hang around indefinitely."}}