Skip to content

Commit

Permalink
[#168] #EXTEND 'assemblyName: DotNet.Testcontainers; function: Testco…
Browse files Browse the repository at this point in the history
…ntainersClient'

{Remove Docker associated volumes on clean up.}
  • Loading branch information
HofmeisterAn committed Nov 28, 2019
1 parent 1fadb64 commit 7d4eaa4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DotNet.Testcontainers/Client/TestcontainersClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public async Task RemoveAsync(string id, CancellationToken ct = default)
{
if (await DockerApiClientContainer.Instance.ExistsWithIdAsync(id))
{
await Docker.Containers.RemoveContainerAsync(id, new ContainerRemoveParameters { Force = true }, ct);
await Docker.Containers.RemoveContainerAsync(id, new ContainerRemoveParameters { Force = true, RemoveVolumes = true }, ct);
}

TestcontainersRegistryService.Unregister(id);
Expand Down

0 comments on commit 7d4eaa4

Please sign in to comment.