NetworkMode
- class aws_cdk.aws_ecr_assets.NetworkMode(*args: Any, **kwargs)
Bases:
object
networking mode on build time supported by docker.
- ExampleMetadata:
infused
Example:
from aws_cdk.aws_ecr_assets import DockerImageAsset, NetworkMode asset = DockerImageAsset(self, "MyBuildImage", directory=path.join(__dirname, "my-image"), network_mode=NetworkMode.HOST )
Attributes
- DEFAULT = <aws_cdk.aws_ecr_assets.NetworkMode object>
- HOST = <aws_cdk.aws_ecr_assets.NetworkMode object>
- NONE = <aws_cdk.aws_ecr_assets.NetworkMode object>
- mode
The networking mode to use for docker build.
Static Methods
- classmethod custom(mode)
Used to specify a custom networking mode Use this if the networking mode name is not yet supported by the CDK.
- Parameters:
mode (
str
) – The networking mode to use for docker build.- Return type:
- classmethod from_container(container_id)
Reuse another container’s network stack.
- Parameters:
container_id (
str
) – The target container’s id or name.- Return type: