Class: Ansible::Ruby::Modules::Docker_image
- Inherits:
-
Base
- Object
- Ansible::Ruby::Models::Base
- Base
- Ansible::Ruby::Modules::Docker_image
- Defined in:
- lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb
Overview
Build, load or pull an image, making the image available for creating containers. Also supports tagging an image into a repository and archiving an image to a .tar file.
Instance Method Summary collapse
-
#archive_path ⇒ String?
Use with state ‘present’ to archive an image to a .tar file.
-
#container_limits ⇒ Object?
A dictionary of limits applied to each container created by the build process.
-
#dockerfile ⇒ String?
Use with state ‘present’ to provide an alternate name for the Dockerfile to use when building an image.
-
#force ⇒ Boolean?
Use with state I(absent) to un-tag and remove all images matching the specified name.
-
#http_timeout ⇒ Object?
Timeout for HTTP requests during the image build operation.
-
#name ⇒ String
Image name.
-
#nocache ⇒ Boolean?
Do not use cache when building an image.
-
#path ⇒ String?
Use with state ‘present’ to build an image.
-
#pull ⇒ Boolean?
When building an image downloads any updates to the FROM image in Dockerfile.
-
#repository ⇒ String?
Full path to a repository.
-
#rm ⇒ Boolean?
Remove intermediate containers after build.
-
#state ⇒ :absent, ...
Make assertions about the state of an image.,When ‘absent’ an image will be removed.
-
#tag ⇒ String?
Used to select an image when pulling.
-
#use_tls ⇒ false, ...
DEPRECATED.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, #initialize, remove_existing_validations, #to_h, validates
Constructor Details
This class inherits a constructor from Ansible::Ruby::Models::Base
Instance Method Details
#archive_path ⇒ String?
Returns Use with state ‘present’ to archive an image to a .tar file.
11 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 11 attribute :archive_path |
#container_limits ⇒ Object?
Returns A dictionary of limits applied to each container created by the build process.
58 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 58 attribute :container_limits |
#dockerfile ⇒ String?
Returns Use with state ‘present’ to provide an alternate name for the Dockerfile to use when building an image.
15 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 15 attribute :dockerfile |
#force ⇒ Boolean?
Returns Use with state I(absent) to un-tag and remove all images matching the specified name. Use with state C(present) to build, load or pull an image when the image already exists.
19 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 19 attribute :force |
#http_timeout ⇒ Object?
Returns Timeout for HTTP requests during the image build operation. Provide a positive integer value for the number of seconds.
23 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 23 attribute :http_timeout |
#name ⇒ String
Returns Image name. Name format will be one of: name, repository/name, registry_server:port/name. When pushing or pulling an image the name can optionally include the tag by appending ‘:tag_name’.
26 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 26 attribute :name |
#nocache ⇒ Boolean?
Returns Do not use cache when building an image.
42 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 42 attribute :nocache |
#path ⇒ String?
Returns Use with state ‘present’ to build an image. Will be the path to a directory containing the context and Dockerfile for building an image.
30 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 30 attribute :path |
#pull ⇒ Boolean?
Returns When building an image downloads any updates to the FROM image in Dockerfile.
34 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 34 attribute :pull |
#repository ⇒ String?
Returns Full path to a repository. Use with state ‘present’ to tag the image into the repository.
46 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 46 attribute :repository |
#rm ⇒ Boolean?
Returns Remove intermediate containers after build.
38 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 38 attribute :rm |
#state ⇒ :absent, ...
Returns Make assertions about the state of an image.,When ‘absent’ an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When ‘present’ check if an image exists using the provided name and tag. If the image is not found or the force option is used, the image will either be pulled, built or loaded. By default the image will be pulled from Docker Hub. To build the image, provide a path value set to a directory containing a context and Dockerfile. To load an image, specify load_path to provide a path to an archive file. To tag an image to a repository, provide a repository path. If the name contains a repository path, it will be pushed.,NOTE: C(build) is DEPRECATED and will be removed in release 2.3. Specifying C(build) will behave the same as C(present).
50 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 50 attribute :state |
#tag ⇒ String?
Returns Used to select an image when pulling. Will be added to the image when pushing, tagging or building. Defaults to ‘latest’ when pulling an image.
54 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 54 attribute :tag |
#use_tls ⇒ false, ...
Returns DEPRECATED. Whether to use tls to connect to the docker server. Set to ‘no’ when TLS will not be used. Set to ‘encrypt’ to use TLS. And set to ‘verify’ to use TLS and verify that the server’s certificate is valid for the server. NOTE: If you specify this option, it will set the value of the tls or tls_verify parameters.
61 |
# File 'lib/ansible/ruby/modules/generated/core/cloud/docker/docker_image.rb', line 61 attribute :use_tls |