Use Docker In the process , function docker-compose up or docker run when , appear Conflict. The name W is already in use by container XYZ. You have to delete.. or "Conflict, cannot remove the default name of the container..."
or ：Conflict. The name "XYZ" is already in use by container hexacode. You have to delete (or rename) that container to be able to reuse that name.
We can't start the container , Because the name is already in use . function docker ps command , I can't see it .
function docker ps -a
Find your container , Copy its Id Number , And then run ：
docker rm 85c2981e63f6 26ea04f41ab3
After deleting , Run again docker-compose up
The second way is from / var Delete the remaining files manually . say concretely , Can be in / var / lib / docker / containers / Find these files under . Each container directory has a very long hash identifier , There's a lot of ugly stuff in there JSON Output . If you search for a specific string that matches the desired container name , You will find the relevant directory containing its configuration files .
Delete the parent directory that matches the name search , And then restart it Docker service . after , You should be able to use your name again .