docker ps -a | grep training/webapp | cut -d ' ' -f 1 | xargs docker rm
- ps -a: list all containers
- grep training/webapp : filter out everything but the containers started from the training/webapp image
- cut -d ' ' -f 1: list only the container ids (first field when delimited by space)
- xargs docker rm : send the container id list output to the docker rm command to remove the container