Fix deleteImages() helper for multiple names
Pass every image name as separate argument. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi) Upstream-commit: bbb245defe670f4fd9b9159b154e0ba5aa93ec87 Component: engine
This commit is contained in:
@@ -322,7 +322,10 @@ func deleteAllContainers() error {
|
||||
}
|
||||
|
||||
func deleteImages(images ...string) error {
|
||||
rmiCmd := exec.Command(dockerBinary, "rmi", strings.Join(images, " "))
|
||||
args := make([]string, 1, 2)
|
||||
args[0] = "rmi"
|
||||
args = append(args, images...)
|
||||
rmiCmd := exec.Command(dockerBinary, args...)
|
||||
exitCode, err := runCommand(rmiCmd)
|
||||
// set error manually if not set
|
||||
if exitCode != 0 && err == nil {
|
||||
|
||||
Reference in New Issue
Block a user