Skip to content

remove_images: true fails to run #338

@bmckay210

Description

@bmckay210

When settings remove_images: true in my kitchen file, the images still remain.
Jenkins console log is showing:
unknown flag: --type See 'docker --help'. Usage: docker [OPTIONS] COMMAND

Found that code is issuing a 'docker docker inspect' command by mistake
def image_exists?(state) state[:image_id] && !!docker_command("docker inspect --type=image #{state[:image_id]}") rescue false end
removing the extra docker in the command seemed to fix the issue
def image_exists?(state) state[:image_id] && !!docker_command("inspect --type=image #{state[:image_id]}") rescue false end

This does result in having the whole image inspect output in the log, while that isn't a terrible thing its really not needed, could there be a better way of seeing if the image still exists?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions