Windows docker-compose up fails with 'Error response from daemon: Conflict. The container name "centos3" is already in use....
Closed this issue · 3 comments
OS: Windows 11
I have validated the files from the zip file that I downloaded per the instructions.
I have searched for solutions but have not found any so far. Any assistance is appreciated.
However when I run the 'docker-compose up' command I receive the following error:
C:\Users\greg\diveintoansible-lab>docker-compose up [+] Building 0.0s (0/0) docker:default time="2023-11-17T20:11:39-05:00" level=warning msg="a network with name diveinto.io exists but was not created for project \"diveintoansible-lab\".\nSet
external: true` to use an existing network"
[+] Running 0/8
- Container ubuntu3 Creating 0.1s
- Container centos3 Creating 0.1s
- Container centos2 Creating 0.1s
- Container ubuntu1 Creating 0.1s
- Container ubuntu-c Creating 0.1s
- Container centos1 Creating 0.1s
- Container docker Creating 0.1s
- Container ubuntu2 Creating 0.1s
Error response from daemon: Conflict. The container name "/centos3" is already in use by container "5abe02dd2c323f6eacf142f452c5fdb6fbcf7be87fc24dcdf80df7904dbfb5aa". You have to remove (or rename) that container to be able to reuse that name.`
Hi @gstreet13
It looks as if you have a container running already, try the following please -
docker compose down
docker compose rm
docker compose up
Does that resolve it for you?
Hi @spurin
I finally got it resolved. I tried the above steps, however I was still getting a conflict error.
After some more troubleshooting, I realized I had downloaded the Dive Into Ansible extension.
The docker compose up command started working after I uninstalled the extension.
Thank you for your quick reply
Greg
Thanks @gstreet13 - I need to put a note on the course so that these are mutually exclusive, sorry you had this trouble