@Generated(value="jsii-pacmak/1.63.2 (build a8a8833)",
date="2022-08-09T19:16:36.497Z")
public class NetworkMode
extends software.amazon.jsii.JsiiObject
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();
Modifier and Type | Field and Description |
---|---|
static NetworkMode |
DEFAULT
The default networking mode if omitted, create a network stack on the default Docker bridge.
|
static NetworkMode |
HOST
Use the Docker host network stack.
|
static NetworkMode |
NONE
Disable the network stack, only the loopback device will be created.
|
Modifier | Constructor and Description |
---|---|
protected |
NetworkMode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
NetworkMode(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static NetworkMode |
custom(java.lang.String mode)
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
|
static NetworkMode |
fromContainer(java.lang.String containerId)
Reuse another container's network stack.
|
java.lang.String |
getMode()
The networking mode to use for docker build.
|
public static final NetworkMode DEFAULT
public static final NetworkMode HOST
public static final NetworkMode NONE
protected NetworkMode(software.amazon.jsii.JsiiObjectRef objRef)
protected NetworkMode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
public static NetworkMode custom(java.lang.String mode)
mode
- The networking mode to use for docker build. This parameter is required.public static NetworkMode fromContainer(java.lang.String containerId)
containerId
- The target container's id or name. This parameter is required.public java.lang.String getMode()