Skip to content

Commit e5c3005

Browse files
authored
Merge pull request #341 from farrukh-taqveem/fix-zombie-containers-issue
Zombie Container (stuck in status=removing) causes Doccum to repeatedly crash
2 parents 76d4c1b + 28650ca commit e5c3005

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

src/run.rs

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,18 @@ fn image_ids_in_use() -> io::Result<HashSet<String>> {
222222
"container",
223223
"ls",
224224
"--all",
225+
"--filter",
226+
"status=created",
227+
"--filter",
228+
"status=restarting",
229+
"--filter",
230+
"status=running",
231+
"--filter",
232+
"status=paused",
233+
"--filter",
234+
"status=exited",
235+
"--filter",
236+
"status=dead",
225237
"--no-trunc",
226238
"--format",
227239
"{{.ID}}",
@@ -231,9 +243,7 @@ fn image_ids_in_use() -> io::Result<HashSet<String>> {
231243

232244
// Ensure the command succeeded.
233245
if !container_ids_output.status.success() {
234-
return Err(io::Error::other(
235-
"Unable to determine IDs of images currently in use by containers.",
236-
));
246+
return Err(io::Error::other("Unable to list containers."));
237247
}
238248

239249
// Interpret the output bytes as UTF-8 and parse the lines.

0 commit comments

Comments
 (0)