Delete container on failure
See original GitHub issueWhen a run command in a devcontainer fails - I believe I am seeing evidence it is not cleaned up. For temporary/hosted build agents this if fine but for dedicated build agents this causes a clash in container name on subsequent runs. This manifests in the error: Error response from daemon: Conflict. The container name "/guacdev" is already in use
. I haven’t been able to confirm this is the case as I don’t have access to the build agent today but will verify next week and confirm.
Issue Analytics
- State:
- Created 2 years ago
- Comments:8
Top Results From Across the Web
Docker error cannot delete docker container, conflict: unable ...
Firstly, run docker container ls -a to list all the containers you have and pinpoint the want you want to delete. Secondly, delete...
Read more >How to fix Docker error cannot delete docker container conflict ...
1. Step 1 - List all the container · 2. Step 2 - List all the images · 3. Step 3 - Pick...
Read more >How To Remove Docker Containers, Images and Volumes ...
This article describes how to delete objects, images, containers, volumes, ... Success or failure is reported with each deletion.
Read more >How to Do a Clean Restart of a Docker Instance
Stop the container(s) using the following command: docker-compose down ; Delete all containers using the following command: docker rm -f $(docker ps -a...
Read more >Error when trying to delete created containers with extended ...
Run docker-compose up -d command and try to delete via Docker Windows. Error will shows up.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @stuartleeks, I’ll let you know once tested - regarding the motivation I have no idea 😛 I’ll ask the devcontainer author 😄.
The fix #94 fixes this as long as no existing image with the desired name already exists on the machine - if this is the case, just delete that named image and runs from then on should work. Thanks @stuartleeks.