Docker containers are designed to be ephemeral—that is, they can be stopped and destroyed easily, and new containers can be built from the same image and put in place with minimal set-up and configuration. The ephemeral nature of Docker containers is ideal for dev/test scenarios, where most developers and other team members use the containers for only a short time.
The final part of our use case is to clean up the resources from the first round of our dev/test by removing the containers. We do this quickly and easily, as follows:
$ docker rm /SQLServer2019
$ docker rm /mssql-restapi