Browse Source

Pass --force when deleting images

We need --force to do proper cleanup. If you end up in a situation
where an image has multiple tags then you won't be able to remove it
without --force.
pull/101/head
Ryan Nowak 6 years ago
parent
commit
760c47821f
  1. 6
      test/E2ETest/DockerAssert.cs

6
test/E2ETest/DockerAssert.cs

@ -55,15 +55,15 @@ namespace E2ETest
foreach (var id in ids)
{
output.WriteLine($"> docker rmi \"{id}\"");
output.WriteLine($"> docker rmi \"{id}\" --force");
var exitCode = await Process.ExecuteAsync(
"docker",
$"rmi \"{id}\"",
$"rmi \"{id}\" --force",
stdOut: OnOutput,
stdErr: OnOutput);
if (exitCode != 0)
{
throw new XunitException($"Running `docker rmi \"{id}\"` failed." + Environment.NewLine + builder.ToString());
throw new XunitException($"Running `docker rmi \"{id}\" --force` failed." + Environment.NewLine + builder.ToString());
}
builder.Clear();

Loading…
Cancel
Save