File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed
Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff 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.
You can’t perform that action at this time.
0 commit comments