The best and the preferred way of removing containers from Docker is to use the docker stop
, as it will allow sending a SIG_HUP
signal to its recipients giving them the time that is required to perform all the finalization and cleanup tasks. Once this activity is completed, we can then comfortably remove the container using the docker rm
command from Docker and thereby updating the docker registry as well.