Skip to content

Prune does not delete unused images #506

@rfrowe

Description

@rfrowe

As per the Docker API, /images/prune should remove all unused images. However Docker::Images.prune never removes unused images. I can only ever get it to delete dangling images.

Using Docker Engine 17.09, I have tried:

Docker::Image.prune
Docker.connection.post('/images/prune', {all: true})
Docker.connection.post('/images/prune', {filters: {dangling: ['true']}.to_json})
Docker.connection.post('/images/prune', {filters: {dangling: ['false']}.to_json})

None of them will remove unused images. I pulled several images that were never used by any containers and they were not removed.

Either this is an issue with this gem or the Docker API itself. Can anyone else reproduce this issue?

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