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/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 C(present) to archive an image to a .tar file.
-
#buildargs ⇒ Hash?
Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.,Docker expects the value to be a string.
-
#container_limits ⇒ Object?
A dictionary of limits applied to each container created by the build process.
-
#dockerfile ⇒ Object?
Use with state C(present) to provide an alternate name for the Dockerfile to use when building an image.
-
#force ⇒ Symbol?
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.
-
#load_path ⇒ String?
Use with state C(present) to load an image from a .tar file.
-
#name ⇒ String
Image name.
-
#nocache ⇒ Symbol?
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.
-
#push ⇒ Symbol?
Push the image to the registry.
-
#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 C(absent) an image will be removed.
-
#tag ⇒ String?
Used to select an image when pulling.
-
#use_tls ⇒ :no, ...
DEPRECATED.
Methods inherited from Base
Methods inherited from Ansible::Ruby::Models::Base
attr_option, attr_options, attribute, fix_inclusion, #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 C(present) to archive an image to a .tar file.
12 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 12 attribute :archive_path |
#buildargs ⇒ Hash?
Returns Provide a dictionary of C(key:value) build arguments that map to Dockerfile ARG directive.,Docker expects the value to be a string. For convenience any non-string values will be converted to strings.,Requires Docker API >= 1.21 and docker-py >= 1.7.0.
66 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 66 attribute :buildargs |
#container_limits ⇒ Object?
Returns A dictionary of limits applied to each container created by the build process.
70 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 70 attribute :container_limits |
#dockerfile ⇒ Object?
Returns Use with state C(present) to provide an alternate name for the Dockerfile to use when building an image.
20 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 20 attribute :dockerfile |
#force ⇒ Symbol?
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.
23 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 23 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.
27 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 27 attribute :http_timeout |
#load_path ⇒ String?
Returns Use with state C(present) to load an image from a .tar file.
16 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 16 attribute :load_path |
#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’.
30 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 30 attribute :name |
#nocache ⇒ Symbol?
Returns Do not use cache when building an image.
50 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 50 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.
34 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 34 attribute :path |
#pull ⇒ Boolean?
Returns When building an image downloads any updates to the FROM image in Dockerfile.
38 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 38 attribute :pull |
#push ⇒ Symbol?
Returns Push the image to the registry. Specify the registry as part of the I(name) or I(repository) parameter.
42 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 42 attribute :push |
#repository ⇒ String?
Returns Full path to a repository. Use with state C(present) to tag the image into the repository. Expects format I(repository:tag). If no tag is provided, will use the value of the C(tag) parameter or I(latest).
54 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 54 attribute :repository |
#rm ⇒ Boolean?
Returns Remove intermediate containers after build.
46 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 46 attribute :rm |
#state ⇒ :absent, ...
Returns Make assertions about the state of an image.,When C(absent) an image will be removed. Use the force option to un-tag and remove all images matching the provided name.,When C(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).
58 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 58 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 I(latest).,If C(name) parameter format is I(name:tag), then tag value from C(name) will take precedence.
62 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 62 attribute :tag |
#use_tls ⇒ :no, ...
Returns DEPRECATED. Whether to use tls to connect to the docker server. Set to C(no) when TLS will not be used. Set to C(encrypt) to use TLS. And set to C(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.
73 |
# File 'lib/ansible/ruby/modules/generated/cloud/docker/docker_image.rb', line 73 attribute :use_tls |