Class NetworkMode
java.lang.Object
software.amazon.jsii.JsiiObject
software.amazon.awscdk.services.ecr.assets.NetworkMode
- All Implemented Interfaces:
software.amazon.jsii.JsiiSerializable
@Generated(value="jsii-pacmak/1.116.0 (build 0eddcff)",
date="2025-10-24T13:34:37.358Z")
@Stability(Stable)
public class NetworkMode
extends software.amazon.jsii.JsiiObject
networking mode on build time supported by docker.
Example:
import software.amazon.awscdk.services.ecr.assets.DockerImageAsset;
import software.amazon.awscdk.services.ecr.assets.NetworkMode;
DockerImageAsset asset = DockerImageAsset.Builder.create(this, "MyBuildImage")
.directory(join(__dirname, "my-image"))
.networkMode(NetworkMode.HOST)
.build();
-
Nested Class Summary
Nested classes/interfaces inherited from class software.amazon.jsii.JsiiObject
software.amazon.jsii.JsiiObject.InitializationMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkModeThe default networking mode if omitted, create a network stack on the default Docker bridge.static final NetworkModeUse the Docker host network stack.static final NetworkModeDisable the network stack, only the loopback device will be created. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedNetworkMode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) protectedNetworkMode(software.amazon.jsii.JsiiObjectRef objRef) -
Method Summary
Modifier and TypeMethodDescriptionstatic NetworkModeUsed to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.static NetworkModefromContainer(String containerId) Reuse another container's network stack.getMode()The networking mode to use for docker build.Methods inherited from class software.amazon.jsii.JsiiObject
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.jsii.JsiiSerializable
$jsii$toJson
-
Field Details
-
DEFAULT
The default networking mode if omitted, create a network stack on the default Docker bridge. -
HOST
Use the Docker host network stack. -
NONE
Disable the network stack, only the loopback device will be created.
-
-
Constructor Details
-
NetworkMode
protected NetworkMode(software.amazon.jsii.JsiiObjectRef objRef) -
NetworkMode
protected NetworkMode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
-
-
Method Details
-
custom
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.- Parameters:
mode- The networking mode to use for docker build. This parameter is required.
-
fromContainer
Reuse another container's network stack.- Parameters:
containerId- The target container's id or name. This parameter is required.
-
getMode
The networking mode to use for docker build.
-