class BundlingDockerImage
Language | Type name |
---|---|
![]() | Amazon.CDK.BundlingDockerImage |
![]() | software.amazon.awscdk.core.BundlingDockerImage |
![]() | aws_cdk.core.BundlingDockerImage |
![]() | @aws-cdk/core » BundlingDockerImage |
⚠️ Deprecated: use DockerImage
A Docker image used for asset bundling.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from '@aws-cdk/core';
const bundlingDockerImage = cdk.BundlingDockerImage.fromAsset('path', /* all optional props */ {
buildArgs: {
buildArgsKey: 'buildArgs',
},
file: 'file',
platform: 'platform',
});
Initializer (protected)
super(image: string, _imageHash?: string)
⚠️ Deprecated: use DockerImage
Parameters
- image
string
— The Docker image. - _imageHash
string
Properties
Name | Type | Description |
---|---|---|
image | string | The Docker image. |
image
⚠️ Deprecated: use DockerImage
Type:
string
The Docker image.
Methods
Name | Description |
---|---|
cp(imagePath, outputPath?) | Copies a file or directory out of the Docker image to the local filesystem. |
run(options?) | Runs a Docker image. |
to | Provides a stable representation of this image for JSON serialization. |
static from | Reference an image that's built directly from sources on disk. |
static from | Reference an image on DockerHub or another online registry. |
cp(imagePath, outputPath?)
public cp(imagePath: string, outputPath?: string): string
⚠️ Deprecated: use DockerImage
Parameters
- imagePath
string
— the path in the Docker image. - outputPath
string
— the destination path for the copy operation.
Returns
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.
run(options?)
public run(options?: DockerRunOptions): void
⚠️ Deprecated: use DockerImage
Parameters
- options
Docker
Run Options
Runs a Docker image.
toJSON()
public toJSON(): string
⚠️ Deprecated: use DockerImage
Returns
string
Provides a stable representation of this image for JSON serialization.
static fromAsset(path, options?)
public static fromAsset(path: string, options?: DockerBuildOptions): BundlingDockerImage
⚠️ Deprecated: use DockerImage.fromBuild()
Parameters
- path
string
— The path to the directory containing the Docker file. - options
Docker
— Docker build options.Build Options
Returns
Reference an image that's built directly from sources on disk.
static fromRegistry(image)
public static fromRegistry(image: string): DockerImage
⚠️ Deprecated: use DockerImage
Parameters
- image
string
— the image name.
Returns
Reference an image on DockerHub or another online registry.