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.103.1 (build bef2dea)", date="2024-09-11T18:01:15.090Z") @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

    Fields
    Modifier and Type
    Field
    Description
    static final NetworkMode
    The default networking mode if omitted, create a network stack on the default Docker bridge.
    static final NetworkMode
    Use the Docker host network stack.
    static final NetworkMode
    Disable the network stack, only the loopback device will be created.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    NetworkMode(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
     
    protected
    NetworkMode(software.amazon.jsii.JsiiObjectRef objRef)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    custom(String mode)
    Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
    fromContainer(String containerId)
    Reuse another container's network stack.
    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, jsiiStaticSet

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface software.amazon.jsii.JsiiSerializable

    $jsii$toJson
  • Field Details

    • DEFAULT

      @Stability(Stable) public static final NetworkMode DEFAULT
      The default networking mode if omitted, create a network stack on the default Docker bridge.
    • HOST

      @Stability(Stable) public static final NetworkMode HOST
      Use the Docker host network stack.
    • NONE

      @Stability(Stable) public static final NetworkMode 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

      @Stability(Stable) @NotNull public static NetworkMode custom(@NotNull String mode)
      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

      @Stability(Stable) @NotNull public static NetworkMode fromContainer(@NotNull String containerId)
      Reuse another container's network stack.

      Parameters:
      containerId - The target container's id or name. This parameter is required.
    • getMode

      @Stability(Stable) @NotNull public String getMode()
      The networking mode to use for docker build.