Skip to content

Commit

Permalink
Docker 0.10.0: Add --no-prune to docker rmi, closes #116
Browse files Browse the repository at this point in the history
  • Loading branch information
bflad committed Apr 13, 2014
1 parent 68158bc commit 994fb86
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Attributes now available for all docker daemon flags as well as system IP forwar
* REMOVED: container_dns* attributes (use replacement dns* attributes on daemon for all containers or docker_container dns* attributes instead)
* DEPRECATED: bind_* attributes to match docker terminology (use host attribute instead)
* Enhancement: [#115][]: Add IP forwarding attributes
* Enhancement: [#116][]: Docker 0.10.0: Add --no-prune to docker rmi
* Enhancement: [#117][]: Docker 0.10.0: Add --output flag to docker save (as well as tag support)
* Enhancement: [#118][]: Docker 0.10.0: Add --input flag to docker load
* Enhancement: [#119][]: Docker 0.10.0: Add support for --env-file to load environment variables from files
Expand Down Expand Up @@ -448,6 +449,7 @@ Lots of community contributions this release -- thanks!
[#112]: https://github.com/bflad/chef-docker/issues/112
[#113]: https://github.com/bflad/chef-docker/issues/113
[#115]: https://github.com/bflad/chef-docker/issues/115
[#116]: https://github.com/bflad/chef-docker/issues/116
[#117]: https://github.com/bflad/chef-docker/issues/117
[#118]: https://github.com/bflad/chef-docker/issues/118
[#119]: https://github.com/bflad/chef-docker/issues/119
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,13 @@ end

#### docker_image action :remove

These attributes are associated with this LWRP action.

Attribute | Description | Type | Default
----------|-------------|------|--------
force | Force removal | TrueClass, FalseClass | nil
no_prune | Do not delete untagged parents | TrueClass, FalseClass | nil

Remove image:

```ruby
Expand Down
3 changes: 2 additions & 1 deletion providers/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ def push

def remove
remove_args = cli_args(
'force' => new_resource.force
'force' => new_resource.force,
'no-prune' => new_resource.no_prune
)
image_name = new_resource.image_name
image_name = "#{image_name}:#{new_resource.tag}" if new_resource.tag
Expand Down
1 change: 1 addition & 0 deletions resources/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
attribute :image_url, :kind_of => [String]
attribute :input, :kind_of => [String]
attribute :no_cache, :kind_of => [TrueClass, FalseClass], :default => false
attribute :no_prune, :kind_of => [TrueClass, FalseClass]
attribute :output, :kind_of => [String]
# DEPRECATED: Use source attribute
attribute :path, :kind_of => [String]
Expand Down

0 comments on commit 994fb86

Please sign in to comment.