diff --git a/CHANGELOG.md b/CHANGELOG.md index 71acfa2ac4..9a5f9fc93f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 @@ -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 diff --git a/README.md b/README.md index 8ec02c4151..7c4de16786 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/providers/image.rb b/providers/image.rb index e5261f1d68..54b08860a3 100644 --- a/providers/image.rb +++ b/providers/image.rb @@ -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 diff --git a/resources/image.rb b/resources/image.rb index 000dcd61ea..ee46223623 100644 --- a/resources/image.rb +++ b/resources/image.rb @@ -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]