@Generated(value="jsii-pacmak/1.67.0 (build 2c027f5)", date="2022-09-19T20:26:35.889Z") @Stability(value=Stable) public class DockerImage extends software.amazon.jsii.JsiiObject
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)
Copies a file or directory out of the Docker image to the local filesystem.
|
String |
cp(String imagePath,
String outputPath)
Copies a file or directory out of the Docker image to the local filesystem.
|
static DockerImage |
fromBuild(String path)
Builds a Docker image.
|
static DockerImage |
fromBuild(String path,
DockerBuildOptions options)
Builds a Docker image.
|
static DockerImage |
fromRegistry(String image)
Reference an image on DockerHub or another online registry.
|
String |
getImage()
The Docker image.
|
void |
run()
Runs a Docker image.
|
void |
run(DockerRunOptions options)
Runs a Docker image.
|
String |
toJSON()
Provides a stable representation of this image for JSON serialization.
|
jsiiAsyncCall, 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=Stable)
public DockerImage(@NotNull
String image,
@Nullable
String _imageHash)
image - This parameter is required._imageHash - @Stability(value=Stable)
public DockerImage(@NotNull
String image)
image - This parameter is required.@Stability(value=Stable) @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=Stable) @NotNull public static DockerImage fromBuild(@NotNull String path)
path - The path to the directory containing the Docker file. This parameter is required.@Stability(value=Stable) @NotNull public static DockerImage fromRegistry(@NotNull String image)
image - the image name. This parameter is required.@Stability(value=Stable) @NotNull public String cp(@NotNull String imagePath, @Nullable String outputPath)
If outputPath is omitted the destination path is a temporary directory.
imagePath - the path in the Docker image. This parameter is required.outputPath - the destination path for the copy operation.@Stability(value=Stable) @NotNull public String cp(@NotNull String imagePath)
If outputPath is omitted the destination path is a temporary directory.
imagePath - the path in the Docker image. This parameter is required.@Stability(value=Stable)
public void run(@Nullable
DockerRunOptions options)
options - @Stability(value=Stable) public void run()
@Stability(value=Stable) @NotNull public String toJSON()
@Stability(value=Stable) @NotNull public String getImage()
Copyright © 2022. All rights reserved.