This PR introduces a new script which script removes all running cdemo Docker containers, if any. It will not remove containers that are not part of the cdemo cluster.
How to test
run the Ansible playbooks as described in README.md
run another Docker container:
$ sudo docker run -d --name test-pr-71 ubuntu sleep infinity
run sudo docker ps and verify that a bunch of containers are up, including the ones the cdemo playbooks create and our separately created test-pr-71 container
run sudo bin/remove-containers
run sudo docker ps and verify that the cdemo containers have been removed, but others (like test-pr-71) are still up
clean up the test container: sudo docker rm -f test-pr-71
What does this PR do?
This PR introduces a new script which script removes all running cdemo Docker containers, if any. It will not remove containers that are not part of the cdemo cluster.
How to test
sudo docker ps
and verify that a bunch of containers are up, including the ones the cdemo playbooks create and our separately createdtest-pr-71
containersudo bin/remove-containers
sudo docker ps
and verify that the cdemo containers have been removed, but others (liketest-pr-71
) are still upsudo docker rm -f test-pr-71