docker: Error response from daemon: Conflict. The container name is already in use by container

In this article, we will see the solution for below error.

docker: Error response from daemon: Conflict. The container name "/mysql101" is already in use by container "3258898f66a7a5fe45e5f00f870a97bcf82e700d60a3621a5a085710e8fa6e28". You have to remove (or rename) that container to be able to reuse that name. See 'docker run --help'.

dockerv Error response from daemon Conflict The container name is already in use by container

It looks like a container with the name already exists in the system. We can check the output of the below command to confirm if it indeed exists:

docker ps -a

The last column in the above command’s output is for names.

If the container exists, we have to remove it by using below command:

docker rm mysql101

Or forcefully using,

docker rm -f mysql101

Now verify container is removed or not by running below command:

docker ps -a

And then try creating a new container.

Leave a Reply

Your email address will not be published. Required fields are marked *