{"action":"created","issue":{"url":"https://api.github.com/repos/docker/docker/issues/11107","labels_url":"https://api.github.com/repos/docker/docker/issues/11107/labels{/name}","comments_url":"https://api.github.com/repos/docker/docker/issues/11107/comments","events_url":"https://api.github.com/repos/docker/docker/issues/11107/events","html_url":"https://github.com/docker/docker/issues/11107","id":59471961,"number":11107,"title":"docker rm needs a real -f argument","user":{"login":"kswope","id":321586,"avatar_url":"https://avatars.githubusercontent.com/u/321586?v=3","gravatar_id":"","url":"https://api.github.com/users/kswope","html_url":"https://github.com/kswope","followers_url":"https://api.github.com/users/kswope/followers","following_url":"https://api.github.com/users/kswope/following{/other_user}","gists_url":"https://api.github.com/users/kswope/gists{/gist_id}","starred_url":"https://api.github.com/users/kswope/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kswope/subscriptions","organizations_url":"https://api.github.com/users/kswope/orgs","repos_url":"https://api.github.com/users/kswope/repos","events_url":"https://api.github.com/users/kswope/events{/privacy}","received_events_url":"https://api.github.com/users/kswope/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-02T11:56:00Z","updated_at":"2015-03-02T22:55:35Z","closed_at":null,"body":"In my script I delete a container by name, but if the container doesn't exsit docker rm returns an error and prints an error.\r\n\r\nAs far as I can tell, there is no way currently to check for the existence of a container since inspect looks at both containers and images.\r\n\r\nI'm looking for either a reliable way to do a check for a container before rm, or for rm to have a similar switch to /usr/bin/rm, which allows it to silently fail with no error if the file doesn't exist.\r\n\r\nSince -f is already taken, I suggest -q for suppress output and silently fail without error return code. 'i' could also work for ignore-fail"},"comment":{"url":"https://api.github.com/repos/docker/docker/issues/comments/76845421","html_url":"https://github.com/docker/docker/issues/11107#issuecomment-76845421","issue_url":"https://api.github.com/repos/docker/docker/issues/11107","id":76845421,"user":{"login":"ahmetalpbalkan","id":159209,"avatar_url":"https://avatars.githubusercontent.com/u/159209?v=3","gravatar_id":"","url":"https://api.github.com/users/ahmetalpbalkan","html_url":"https://github.com/ahmetalpbalkan","followers_url":"https://api.github.com/users/ahmetalpbalkan/followers","following_url":"https://api.github.com/users/ahmetalpbalkan/following{/other_user}","gists_url":"https://api.github.com/users/ahmetalpbalkan/gists{/gist_id}","starred_url":"https://api.github.com/users/ahmetalpbalkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ahmetalpbalkan/subscriptions","organizations_url":"https://api.github.com/users/ahmetalpbalkan/orgs","repos_url":"https://api.github.com/users/ahmetalpbalkan/repos","events_url":"https://api.github.com/users/ahmetalpbalkan/events{/privacy}","received_events_url":"https://api.github.com/users/ahmetalpbalkan/received_events","type":"User","site_admin":false},"created_at":"2015-03-02T22:55:35Z","updated_at":"2015-03-02T22:55:35Z","body":"@kswope you can probably do something like `docker rm -f foo; true` to unblock yourself. you can check the existence of container using `docker ps -aq | grep container_name`\r\n\r\nThis feature request is probably also valid for `rmi` command?"}}