Aside from methods in API definition - conu.apidefs.image.Image, DockerImage implements following methods:
Utility functions for docker images.
These methods are specific to this backend:
- DockerImage.inspect()
- DockerImage.run_via_binary_in_foreground()
- DockerImage.is_present()
- DockerImage.tag_image()
These generic methods are not implemented in this backend:
- conu.apidefs.image.Image.create_container()
- conu.apidefs.image.Image.directory_is_present()
- conu.apidefs.image.Image.file_is_present()
- conu.apidefs.image.Image.get_selinux_context()
- conu.apidefs.image.Image.load_from_file()
- conu.apidefs.image.Image.mount_image()
- conu.apidefs.image.Image.run_via_api()
Parameters: |
|
---|
Provide full, complete image name
Returns: | str |
---|
get unique identifier of this image
Returns: | str |
---|
return cached metadata by default
Parameters: | refresh – bool, update the metadata with up to date content |
---|---|
Returns: | dict |
return cached metadata by default (a convenience method)
Parameters: | refresh – bool, update the metadata with up to date content |
---|---|
Returns: | dict |
Is this docker image present locally on the system?
Returns: | bool, True if it is, False if it’s not |
---|
mount image filesystem
Parameters: | mount_point – str, directory where the filesystem will be mounted |
---|---|
Returns: | instance of DockerImageFS |
Pull this image from registry. Raises an exception if the image is not found in the registry.
Returns: | None |
---|
remove this image
Parameters: |
|
---|---|
Returns: | None |
create a container using this image and run it in background; this method is useful to test real user scenarios when users invoke containers using binary
Parameters: | run_command_instance – instance of DockerRunBuilder |
---|---|
Returns: | instance of DockerContainer |
Create a container using this image and run it in foreground; this method is useful to test real user scenarios when users invoke containers using binary and pass input into the container via STDIN. You are also responsible for:
- redirecting STDIN when intending to use container.write_to_stdin afterwards by setting
popen_params={“stdin”: subprocess.PIPE} during run_via_binary_in_foreground
- checking whether the container exited successfully via:
container.popen_instance.returncode
Please consult the documentation for subprocess python module for best practices on how you should work with instance of Popen
Parameters: |
|
---|---|
Returns: | instance of DockerContainer |
Apply additional tags to the image or even add a new name
Parameters: |
|
---|---|
Returns: | instance of DockerImage |
This Enum defines the policy for pulling the docker images. The pull operation happens when creating an instance of a docker image. Supported values:
These generic methods are not implemented in this backend:
Raises CommandDoesNotExistException if the command is not present on the system.
Parameters: |
|
---|
Aside from methods in API definition - conu.apidefs.image.S2Image, S2IDockerImage implements following methods:
These methods are specific to this backend:
- S2IDockerImage.extend()
- S2IDockerImage.inspect()
- S2IDockerImage.run_via_binary_in_foreground()
- S2IDockerImage.is_present()
- S2IDockerImage.tag_image()
- S2IDockerImage.usage()
These generic methods are not implemented in this backend:
- conu.apidefs.image.Image.create_container()
- conu.apidefs.image.Image.directory_is_present()
- conu.apidefs.image.Image.file_is_present()
- conu.apidefs.image.Image.get_selinux_context()
- conu.apidefs.image.Image.load_from_file()
- conu.apidefs.image.Image.mount_image()
- conu.apidefs.image.Image.run_via_api()
Provide output of s2i usage
Returns: | str |
---|
extend this s2i-enabled image using provided source, raises ConuException if s2i build fails
Parameters: |
|
---|---|
Returns: | S2Image instance |