Complete the command to remove a container named my_container.
docker container [1] my_containerThe docker container rm command removes a container. Here, it removes the container named my_container.
Complete the command to force remove a container with ID abc123.
docker container rm [1] abc123The -f option forces removal of a running container by stopping it first.
Fix the error in the command to remove all stopped containers.
docker container rm $(docker ps -a -q [1])The docker ps -a -q --filter status=exited lists all stopped containers. Removing these removes only stopped containers.
Fill both blanks to remove all running containers.
docker container rm [1] $(docker ps -a -q [2])
-f will cause errors when removing running containers.exited will not select running containers.The -f forces removal of running containers, and filtering by status=running selects running containers to remove.
Fill all three blanks to remove containers with names starting with 'web' that are stopped.
docker container rm $(docker ps -a -q [1] [2]=[3])
Use --filter name=web to select containers with names starting with 'web'. Combined with docker ps -a -q, this lists matching containers to remove.