DockerImage
A Docker image.
Initializers
import com.aliyun.ros.cdk.core.DockerImage;
new DockerImage(java.lang.String image);,new DockerImage(java.lang.String image, java.lang.String _imageHash);
Name | Type | Description |
---|---|---|
image |
java.lang.String |
No description. |
_imageHash |
java.lang.String |
No description. |
image
Required
- Type: java.lang.String
_imageHash
Optional
- Type: java.lang.String
Methods
Name | Description |
---|---|
cp |
Copies a file or directory out of the Docker image to the local filesystem. |
run |
Runs a Docker image. |
toJSON |
Provides a stable representation of this image for JSON serialization. |
cp
public java.lang.String cp(java.lang.String imagePath)
public java.lang.String cp(java.lang.String imagePath, java.lang.String outputPath)
Copies a file or directory out of the Docker image to the local filesystem.
If outputPath
is omitted the destination path is a temporary directory.
- Type: java.lang.String
the path in the Docker image.
- Type: java.lang.String
the destination path for the copy operation.
run
public void run()
public void run(DockerRunOptions options)
Runs a Docker image.
- Type: DockerRunOptions
toJSON
public java.lang.String toJSON()
Provides a stable representation of this image for JSON serialization.
Static Functions
Name | Description |
---|---|
fromBuild |
Builds a Docker image. |
fromRegistry |
Reference an image on DockerHub or another online registry. |
fromBuild
import com.aliyun.ros.cdk.core.DockerImage;
DockerImage.fromBuild(java.lang.String path),DockerImage.fromBuild(java.lang.String path, DockerBuildOptions options)
Builds a Docker image.
- Type: java.lang.String
The path to the directory containing the Docker file.
- Type: DockerBuildOptions
Docker build options.
fromRegistry
import com.aliyun.ros.cdk.core.DockerImage;
DockerImage.fromRegistry(java.lang.String image)
Reference an image on DockerHub or another online registry.
- Type: java.lang.String
the image name.
Properties
Name | Type | Description |
---|---|---|
image |
java.lang.String |
No description. |
image
Required
public java.lang.String getImage();
- Type: java.lang.String