You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running the ShouldReuseExistingResource test in the ReusableResourceTest creates a reusable container, a reusable network and a reusable volume. They are properly disposed in the DisposeAsync method but since these three resources are configured as reusable they are not deleted.
This is not an issue when running on disposable virtual machines for continuous integration scenarios. This is problematic when running on our development machines where those resources with random GUIDs are piling up, though. The accumulation of networks is particularly problematic since it will eventually lead to this error: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network, rendering Docker unusable until running docker network prune manually.
Both DockerNetwork and DockerVolume have a public DeleteAsync method but those classes are internal. The DockerContainer class is public but has no DeleteAsync method so I'm not sure what's the best way to fix this issue.
Besides the issue about the test I had already wondered how a reusable Docker resource could be deleted programatically using the Testcontainers API.
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered:
Testcontainers version
3.8.0
Using the latest Testcontainers version?
Yes
Host OS
Any
Host arch
Any
.NET version
8.0.204
Docker version
Docker info
What happened?
Running the
ShouldReuseExistingResource
test in theReusableResourceTest
creates a reusable container, a reusable network and a reusable volume. They are properly disposed in theDisposeAsync
method but since these three resources are configured as reusable they are not deleted.This is not an issue when running on disposable virtual machines for continuous integration scenarios. This is problematic when running on our development machines where those resources with random GUIDs are piling up, though. The accumulation of networks is particularly problematic since it will eventually lead to this error: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network, rendering Docker unusable until running
docker network prune
manually.Both
DockerNetwork
andDockerVolume
have a publicDeleteAsync
method but those classes are internal. TheDockerContainer
class is public but has noDeleteAsync
method so I'm not sure what's the best way to fix this issue.Besides the issue about the test I had already wondered how a reusable Docker resource could be deleted programatically using the Testcontainers API.
Relevant log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: