Tag Archives: docker: Error response from daemon: Conflict. The container name “/xx” is already in use

docker: Error response from daemon: Conflict. The container name “/xx” is already in use

What are the eight life cycle hook functions of Vue>>>

The container name “* *” is already in use
solution:
(1) change the container name, for example, docker run – it — name = mycentos2 centos:7 /bin/bash (2) delete the original container

Query current container: docker container LS – all

Delete the current container: docker container RM mycentos (hint: this step can only be done if it is OK to delete the container)

There are two different words, images and container. Images is easy to understand. It means the same as the image of the virtual machine in common use. It is equivalent to a template, while container is the state of the images at runtime. Docker keeps a status (container) for the running image. You can use the command docker PS to view the running container. For the exited container, you can use docker PS – A to view it if you exit a container and forget to save the data in it, you can use docker PS – A to find the corresponding running container, and use the docker commit command to save it as image and then run it

Back to the previous question, because the image is referenced (used to run) by a container, if the referenced container is not destroyed (deleted), the image must not be deleted

So if you want to delete the running images, you must first delete its container
————————————————

For the above error, you can also:

You have to remove (or rename) that container to be able to reuse that name.
the above error occurs because it already exists in the docker container, Then delete. Docker RM fb087642b497 (the containerid)
if you want to use it again, use

to

Docker restart image name
1
can restart the container
————————————————

https://blog.csdn.net/qq_ 36487585/article/details/84327230

https://blog.csdn.net/liuyinfei_ java/article/details/88634469