Class NetworkMode
networking mode on build time supported by docker.
Inheritance
Namespace: Amazon.CDK.AWS.Ecr.Assets
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class NetworkMode : DeputyBase
Syntax (vb)
Public Class NetworkMode
Inherits DeputyBase
Remarks
ExampleMetadata: infused
Examples
using Amazon.CDK.AWS.Ecr.Assets;
var asset = new DockerImageAsset(this, "MyBuildImage", new DockerImageAssetProps {
Directory = Join(__dirname, "my-image"),
NetworkMode = NetworkMode.HOST
});
Synopsis
Constructors
NetworkMode(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
NetworkMode(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Properties
DEFAULT | The default networking mode if omitted, create a network stack on the default Docker bridge. |
HOST | Use the Docker host network stack. |
Mode | The networking mode to use for docker build. |
NONE | Disable the network stack, only the loopback device will be created. |
Methods
Custom(String) | Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK. |
FromContainer(String) | Reuse another container's network stack. |
Constructors
NetworkMode(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected NetworkMode(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
NetworkMode(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected NetworkMode(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Properties
DEFAULT
The default networking mode if omitted, create a network stack on the default Docker bridge.
public static NetworkMode DEFAULT { get; }
Property Value
HOST
Use the Docker host network stack.
public static NetworkMode HOST { get; }
Property Value
Mode
The networking mode to use for docker build.
public virtual string Mode { get; }
Property Value
System.String
NONE
Disable the network stack, only the loopback device will be created.
public static NetworkMode NONE { get; }
Property Value
Methods
Custom(String)
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
public static NetworkMode Custom(string mode)
Parameters
- mode System.String
The networking mode to use for docker build.
Returns
FromContainer(String)
Reuse another container's network stack.
public static NetworkMode FromContainer(string containerId)
Parameters
- containerId System.String
The target container's id or name.
Returns