mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix deleteImages() helper for multiple names
Pass every image name as separate argument. Signed-off-by: Tõnis Tiigi <tonistiigi@gmail.com> (github: tonistiigi)
This commit is contained in:
parent
da3d3b97eb
commit
bbb245defe
1 changed files with 4 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue