@Generated(value="jsii-pacmak/1.50.0 (build d1830a4)", date="2022-01-04T15:39:01.092Z") @Stability(value=Experimental) public class DockerImage extends BundlingDockerImage
Example:
String entry = "/path/to/function";
DockerImage image = DockerImage.fromBuild(entry);
PythonFunction.Builder.create(this, "function")
.entry(entry)
.runtime(Runtime.PYTHON_3_8)
.bundling(BundlingOptions.builder()
.buildArgs(Map.of("PIP_INDEX_URL", "https://your.index.url/simple/", "PIP_EXTRA_INDEX_URL", "https://your.extra-index.url/simple/"))
.build())
.build();
| Modifier | Constructor and Description |
|---|---|
protected |
DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
DockerImage(software.amazon.jsii.JsiiObjectRef objRef) |
|
DockerImage(String image) |
|
DockerImage(String image,
String _imageHash) |
| Modifier and Type | Method and Description |
|---|---|
String |
cp(String imagePath)
(experimental) Copies a file or directory out of the Docker image to the local filesystem.
|
String |
cp(String imagePath,
String outputPath)
(experimental) Copies a file or directory out of the Docker image to the local filesystem.
|
static DockerImage |
fromBuild(String path)
(experimental) Builds a Docker image.
|
static DockerImage |
fromBuild(String path,
DockerBuildOptions options)
(experimental) Builds a Docker image.
|
static DockerImage |
fromRegistry(String image)
(experimental) Reference an image on DockerHub or another online registry.
|
String |
getImage()
(experimental) The Docker image.
|
void |
run()
(experimental) Runs a Docker image.
|
void |
run(DockerRunOptions options)
(experimental) Runs a Docker image.
|
String |
toJSON()
(experimental) Provides a stable representation of this image for JSON serialization.
|
fromAsset, fromAssetjsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected DockerImage(software.amazon.jsii.JsiiObjectRef objRef)
protected DockerImage(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental)
public DockerImage(@NotNull
String image,
@Nullable
String _imageHash)
image - This parameter is required._imageHash - @Stability(value=Experimental)
public DockerImage(@NotNull
String image)
image - This parameter is required.@Stability(value=Experimental) @NotNull public static DockerImage fromBuild(@NotNull String path, @Nullable DockerBuildOptions options)
path - The path to the directory containing the Docker file. This parameter is required.options - Docker build options.@Stability(value=Experimental) @NotNull public static DockerImage fromBuild(@NotNull String path)
path - The path to the directory containing the Docker file. This parameter is required.@Stability(value=Experimental) @NotNull public static DockerImage fromRegistry(@NotNull String image)
image - the image name. This parameter is required.@Stability(value=Experimental) @NotNull public String cp(@NotNull String imagePath, @Nullable String outputPath)
If outputPath is omitted the destination path is a temporary directory.
cp in class BundlingDockerImageimagePath - the path in the Docker image. This parameter is required.outputPath - the destination path for the copy operation.@Stability(value=Experimental) @NotNull public String cp(@NotNull String imagePath)
If outputPath is omitted the destination path is a temporary directory.
cp in class BundlingDockerImageimagePath - the path in the Docker image. This parameter is required.@Stability(value=Experimental)
public void run(@Nullable
DockerRunOptions options)
run in class BundlingDockerImageoptions - @Stability(value=Experimental) public void run()
run in class BundlingDockerImage@Stability(value=Experimental) @NotNull public String toJSON()
toJSON in class BundlingDockerImage@Stability(value=Experimental) @NotNull public String getImage()
getImage in class BundlingDockerImageCopyright © 2022. All rights reserved.