Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Delete Workspace: Conflict Error Due to Image Reference in Use by Another Container #387

Open
techwithanirudh opened this issue Oct 14, 2024 · 2 comments
Labels
community Pull Requests and issues created by the community. help wanted Extra attention is needed

Comments

@techwithanirudh
Copy link

techwithanirudh commented Oct 14, 2024

Issue:

When attempting to delete a workspace that uses the DevContainers Docker template, and another running container is using the same image, the deletion fails with the following error:

Error: Unable to remove Docker image: Error response from daemon: conflict: unable to remove repository reference "ghcr.io/coder/envbuilder:latest" (must force) - container xxxxxxx is using its referenced image xxxxxxx.

Steps to Reproduce:

  1. Create two workspaces, both using the DevContainers Docker template.
  2. Attempt to delete one workspace while the other is still running and using the same template.
  3. Observe the conflict error during the deletion process.

Workaround:

Attempting to delete the workspace after stopping the other running workspace succeeds.

Additonal Info:

Environment:

  • Coder Version: v2.16.0+683a720
  • OS: Linux (installed using the setup script)
@coder-labeler coder-labeler bot added the bug label Oct 14, 2024
@matifali matifali transferred this issue from coder/coder Oct 14, 2024
@coder-labeler coder-labeler bot added the help wanted Extra attention is needed label Oct 14, 2024
@matifali matifali removed the bug label Oct 15, 2024
@johnstcn
Copy link
Member

johnstcn commented Oct 16, 2024

@techwithanirudh Can you reproduce this behaviour without Terraform (that is, by running two instances of Envbuilder in parallel)? I'm expecting that this is not the case, and this behaviour is related to the kreuzwerker/docker Terraform provider.

@johnstcn johnstcn added the community Pull Requests and issues created by the community. label Oct 16, 2024
@techwithanirudh
Copy link
Author

@johnstcn Yes, I ran two Envbuilder instances in parallel. I tried stopping one, and there were no issues at all.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Pull Requests and issues created by the community. help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants