We can remove a container permanently, but before that, we have to stop the container or use the force option. In this recipe, we'll create and remove a container.
Removing a container
Getting ready
Ensure that the Docker daemon is running on the host and can be connected through the Docker client. You will also need some containers in a stopped or running state to delete them.
How to do it...
Use the following command:
$ docker container rm [OPTIONS] CONTAINER [CONTAINER]
Or run the following legacy command:
$ docker rm [OPTIONS] CONTAINER [CONTAINER]
Let...