question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delete container on failure

See original GitHub issue

When 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:closed
  • Created 2 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
jjcollingecommented, Jul 19, 2021

Thanks @stuartleeks, I’ll let you know once tested - regarding the motivation I have no idea 😛 I’ll ask the devcontainer author 😄.

0reactions
jjcollingecommented, Jul 21, 2021

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found