DockerImage
A Docker image.
Initializers
import { DockerImage } from '@alicloud/ros-cdk-core'
new DockerImage(image: string, _imageHash?: string)
Name | Type | Description |
---|---|---|
image |
string |
No description. |
_imageHash |
string |
No description. |
image
Required
- Type: string
_imageHash
Optional
- Type: 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 cp(imagePath: string, outputPath?: string): string
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: string
the path in the Docker image.
- Type: string
the destination path for the copy operation.
run
public run(options?: DockerRunOptions): void
Runs a Docker image.
- Type: DockerRunOptions
toJSON
public toJSON(): string
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 { DockerImage } from '@alicloud/ros-cdk-core'
DockerImage.fromBuild(path: string, options?: DockerBuildOptions)
Builds a Docker image.
- Type: string
The path to the directory containing the Docker file.
- Type: DockerBuildOptions
Docker build options.
fromRegistry
import { DockerImage } from '@alicloud/ros-cdk-core'
DockerImage.fromRegistry(image: string)
Reference an image on DockerHub or another online registry.
- Type: string
the image name.
Properties
Name | Type | Description |
---|---|---|
image |
string |
No description. |
image
Required
public readonly image: string;
- Type: string