{"action":"created","issue":{"url":"https://api.github.com/repos/docker/swarmkit/issues/1372","repository_url":"https://api.github.com/repos/docker/swarmkit","labels_url":"https://api.github.com/repos/docker/swarmkit/issues/1372/labels{/name}","comments_url":"https://api.github.com/repos/docker/swarmkit/issues/1372/comments","events_url":"https://api.github.com/repos/docker/swarmkit/issues/1372/events","html_url":"https://github.com/docker/swarmkit/issues/1372","id":171142382,"number":1372,"title":"Remove containers on swarm service scale down","user":{"login":"igrcic","id":394398,"avatar_url":"https://avatars.githubusercontent.com/u/394398?v=3","gravatar_id":"","url":"https://api.github.com/users/igrcic","html_url":"https://github.com/igrcic","followers_url":"https://api.github.com/users/igrcic/followers","following_url":"https://api.github.com/users/igrcic/following{/other_user}","gists_url":"https://api.github.com/users/igrcic/gists{/gist_id}","starred_url":"https://api.github.com/users/igrcic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/igrcic/subscriptions","organizations_url":"https://api.github.com/users/igrcic/orgs","repos_url":"https://api.github.com/users/igrcic/repos","events_url":"https://api.github.com/users/igrcic/events{/privacy}","received_events_url":"https://api.github.com/users/igrcic/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/docker/swarmkit/labels/kind/question","name":"kind/question","color":"EBEFC9"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-15T10:03:15Z","updated_at":"2016-08-16T02:05:16Z","closed_at":null,"body":"Hi everyone,\r\n\r\nfirst I'd like to ask if this is the right repo to be asking questions regarding to `docker swarm *`  engine commands? \r\n\r\nI am currently testing docker swarm engine in order to see if I can use this new functionality for some of our (non-critical) production environment.\r\n\r\nI noticed that when scaling down services, containers in exited status remain (1.12) in docker. When I was testing beta2 or beta3 the containers were automatically removed. \r\n\r\nCan one achieve this behavior somehow in v1.12? \r\n\r\nThank you,\r\nIvan"},"comment":{"url":"https://api.github.com/repos/docker/swarmkit/issues/comments/239982335","html_url":"https://github.com/docker/swarmkit/issues/1372#issuecomment-239982335","issue_url":"https://api.github.com/repos/docker/swarmkit/issues/1372","id":239982335,"user":{"login":"stevvooe","id":120601,"avatar_url":"https://avatars.githubusercontent.com/u/120601?v=3","gravatar_id":"","url":"https://api.github.com/users/stevvooe","html_url":"https://github.com/stevvooe","followers_url":"https://api.github.com/users/stevvooe/followers","following_url":"https://api.github.com/users/stevvooe/following{/other_user}","gists_url":"https://api.github.com/users/stevvooe/gists{/gist_id}","starred_url":"https://api.github.com/users/stevvooe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stevvooe/subscriptions","organizations_url":"https://api.github.com/users/stevvooe/orgs","repos_url":"https://api.github.com/users/stevvooe/repos","events_url":"https://api.github.com/users/stevvooe/events{/privacy}","received_events_url":"https://api.github.com/users/stevvooe/received_events","type":"User","site_admin":false},"created_at":"2016-08-16T02:05:16Z","updated_at":"2016-08-16T02:05:16Z","body":"@igrcic Note that it is also safe to remove exited containers manually. Something like the following can run on the work nodes periodically:\r\n\r\n```console\r\n$ docker ps -qa -f label=com.docker.swarm.task -f status=exited | xargs docker rm -f\r\n```\r\n\r\nThis can be used if you'd like to have a more aggressive policy about cleaning up resources but would like to have some task history for debugging purposes."}}
{"actor":{"display_login":"stevvooe"}}