Class AssetImage
An image that will be built from a local directory with a Dockerfile.
Inherited Members
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class AssetImage : ContainerImage
Syntax (vb)
Public Class AssetImage
Inherits ContainerImage
Remarks
ExampleMetadata: fixture=_generated
Examples
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK;
using Amazon.CDK.AWS.Ecr.Assets;
using Amazon.CDK.AWS.ECS;
NetworkMode networkMode;
Platform platform;
var assetImage = AssetImage.FromAsset("directory", new AssetImageProps {
AssetName = "assetName",
BuildArgs = new Dictionary<string, string> {
{ "buildArgsKey", "buildArgs" }
},
BuildSecrets = new Dictionary<string, string> {
{ "buildSecretsKey", "buildSecrets" }
},
BuildSsh = "buildSsh",
CacheDisabled = false,
CacheFrom = new [] { new DockerCacheOption {
Type = "type",
// the properties below are optional
Params = new Dictionary<string, string> {
{ "paramsKey", "params" }
}
} },
CacheTo = new DockerCacheOption {
Type = "type",
// the properties below are optional
Params = new Dictionary<string, string> {
{ "paramsKey", "params" }
}
},
Exclude = new [] { "exclude" },
ExtraHash = "extraHash",
File = "file",
FollowSymlinks = SymlinkFollowMode.NEVER,
IgnoreMode = IgnoreMode.GLOB,
Invalidation = new DockerImageAssetInvalidationOptions {
BuildArgs = false,
BuildSecrets = false,
BuildSsh = false,
ExtraHash = false,
File = false,
NetworkMode = false,
Outputs = false,
Platform = false,
RepositoryName = false,
Target = false
},
NetworkMode = networkMode,
Outputs = new [] { "outputs" },
Platform = platform,
Target = "target"
});
Synopsis
Constructors
AssetImage(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
AssetImage(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
AssetImage(String, IAssetImageProps) | Constructs a new instance of the AssetImage class. |
Methods
Bind(Construct, ContainerDefinition) | Called when the image is used by a ContainerDefinition. |
Constructors
AssetImage(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected AssetImage(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
AssetImage(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected AssetImage(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
AssetImage(String, IAssetImageProps)
Constructs a new instance of the AssetImage class.
public AssetImage(string directory, IAssetImageProps props = null)
Parameters
- directory System.String
The directory containing the Dockerfile.
- props IAssetImageProps
The directory containing the Dockerfile.
Methods
Bind(Construct, ContainerDefinition)
Called when the image is used by a ContainerDefinition.
public override IContainerImageConfig Bind(Construct scope, ContainerDefinition containerDefinition)
Parameters
- scope Constructs.Construct
- containerDefinition ContainerDefinition
Returns