Class AssetImageProps
The properties for building an AssetImage.
Inheritance
Implements
Namespace: Amazon.CDK.AWS.ECS
Assembly: Amazon.CDK.AWS.ECS.dll
Syntax (csharp)
public class AssetImageProps : Object, IAssetImageProps, IDockerImageAssetOptions, IFingerprintOptions, ICopyOptions, IFileFingerprintOptions, IFileCopyOptions
Syntax (vb)
Public Class AssetImageProps
Inherits Object
Implements IAssetImageProps, IDockerImageAssetOptions, IFingerprintOptions, ICopyOptions, IFileFingerprintOptions, IFileCopyOptions
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.Assets;
using Amazon.CDK.AWS.Ecr.Assets;
using Amazon.CDK.AWS.ECS;
using Amazon.CDK;
NetworkMode networkMode;
Platform platform;
var assetImageProps = new AssetImageProps {
BuildArgs = new Dictionary<string, string> {
{ "buildArgsKey", "buildArgs" }
},
Exclude = new [] { "exclude" },
ExtraHash = "extraHash",
File = "file",
Follow = FollowMode.NEVER,
FollowSymlinks = SymlinkFollowMode.NEVER,
IgnoreMode = IgnoreMode.GLOB,
Invalidation = new DockerImageAssetInvalidationOptions {
BuildArgs = false,
ExtraHash = false,
File = false,
NetworkMode = false,
Platform = false,
RepositoryName = false,
Target = false
},
NetworkMode = networkMode,
Platform = platform,
RepositoryName = "repositoryName",
Target = "target"
};
Synopsis
Constructors
AssetImageProps() |
Properties
BuildArgs | Build args to pass to the |
Exclude | (deprecated) Glob patterns to exclude from the copy. |
ExtraHash | (deprecated) Extra information to encode into the fingerprint (e.g. build instructions and other inputs). |
File | Path to the Dockerfile (relative to the directory). |
Follow | (deprecated) A strategy for how to handle symlinks. |
FollowSymlinks | A strategy for how to handle symlinks. |
IgnoreMode | (deprecated) The ignore behavior to use for exclude patterns. |
Invalidation | Options to control which parameters are used to invalidate the asset hash. |
NetworkMode | Networking mode for the RUN commands during build. |
Platform | Platform to build for. |
RepositoryName | (deprecated) ECR repository name. |
Target | Docker target to build to. |
Constructors
AssetImageProps()
public AssetImageProps()
Properties
BuildArgs
Build args to pass to the docker build
command.
public IDictionary<string, string> BuildArgs { get; set; }
Property Value
System.Collections.Generic.IDictionary<System.String, System.String>
Remarks
Since Docker build arguments are resolved before deployment, keys and
values cannot refer to unresolved tokens (such as lambda.functionArn
or
queue.queueUrl
).
Default: - no build args are passed
Exclude
(deprecated) Glob patterns to exclude from the copy.
public string[] Exclude { get; set; }
Property Value
System.String[]
Remarks
Default: nothing is excluded
Stability: Deprecated
ExtraHash
(deprecated) Extra information to encode into the fingerprint (e.g. build instructions and other inputs).
public string ExtraHash { get; set; }
Property Value
System.String
Remarks
Default: - hash is only based on source content
Stability: Deprecated
File
Path to the Dockerfile (relative to the directory).
public string File { get; set; }
Property Value
System.String
Remarks
Default: 'Dockerfile'
Follow
(deprecated) A strategy for how to handle symlinks.
public Nullable<FollowMode> Follow { get; set; }
Property Value
System.Nullable<FollowMode>
Remarks
Default: Never
Stability: Deprecated
FollowSymlinks
A strategy for how to handle symlinks.
public Nullable<SymlinkFollowMode> FollowSymlinks { get; set; }
Property Value
System.Nullable<SymlinkFollowMode>
Remarks
Default: SymlinkFollowMode.NEVER
IgnoreMode
(deprecated) The ignore behavior to use for exclude patterns.
public Nullable<IgnoreMode> IgnoreMode { get; set; }
Property Value
System.Nullable<IgnoreMode>
Remarks
Default: - GLOB for file assets, DOCKER or GLOB for docker assets depending on whether the '
Stability: Deprecated
Aws-cdk: /aws-ecr-assets:dockerIgnoreSupport' flag is set.
Invalidation
Options to control which parameters are used to invalidate the asset hash.
public IDockerImageAssetInvalidationOptions Invalidation { get; set; }
Property Value
IDockerImageAssetInvalidationOptions
Remarks
Default: - hash all parameters
NetworkMode
Networking mode for the RUN commands during build.
public NetworkMode NetworkMode { get; set; }
Property Value
Remarks
Support docker API 1.25+.
Default: - no networking mode specified (the default networking mode NetworkMode.DEFAULT
will be used)
Platform
Platform to build for.
public Platform_ Platform { get; set; }
Property Value
Remarks
Requires Docker Buildx.
Default: - no platform specified (the current machine architecture will be used)
RepositoryName
(deprecated) ECR repository name.
public string RepositoryName { get; set; }
Property Value
System.String
Remarks
Specify this property if you need to statically address the image, e.g. from a Kubernetes Pod. Note, this is only the repository name, without the registry and the tag parts.
Default: - the default ECR repository for CDK assets
Stability: Deprecated
Target
Docker target to build to.
public string Target { get; set; }
Property Value
System.String
Remarks
Default: - no target