Interface IAssetImageCodeProps
Properties to initialize a new AssetImage.
Inherited Members
Namespace: Amazon.CDK.AWS.Lambda
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public interface IAssetImageCodeProps : IDockerImageAssetOptions, IFileFingerprintOptions, IFileCopyOptions
Syntax (vb)
Public Interface IAssetImageCodeProps
Inherits IDockerImageAssetOptions, 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;
using Amazon.CDK.AWS.Ecr.Assets;
using Amazon.CDK.AWS.Lambda;
NetworkMode networkMode;
Platform platform;
var assetImageCodeProps = new AssetImageCodeProps {
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" }
}
},
Cmd = new [] { "cmd" },
Entrypoint = new [] { "entrypoint" },
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",
WorkingDirectory = "workingDirectory"
};
Synopsis
Properties
Cmd | Specify or override the CMD on the specified Docker image or Dockerfile. |
Entrypoint | Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile. |
WorkingDirectory | Specify or override the WORKDIR on the specified Docker image or Dockerfile. |
Properties
Cmd
Specify or override the CMD on the specified Docker image or Dockerfile.
virtual string[] Cmd { get; }
Property Value
System.String[]
Remarks
This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ]
.
Default: - use the CMD specified in the docker image or Dockerfile.
Entrypoint
Specify or override the ENTRYPOINT on the specified Docker image or Dockerfile.
virtual string[] Entrypoint { get; }
Property Value
System.String[]
Remarks
An ENTRYPOINT allows you to configure a container that will run as an executable.
This needs to be in the 'exec form', viz., [ 'executable', 'param1', 'param2' ]
.
Default: - use the ENTRYPOINT in the docker image or Dockerfile.
See: https://docs.docker.com/engine/reference/builder/#entrypoint
WorkingDirectory
Specify or override the WORKDIR on the specified Docker image or Dockerfile.
virtual string WorkingDirectory { get; }
Property Value
System.String
Remarks
A WORKDIR allows you to configure the working directory the container will use.
Default: - use the WORKDIR in the docker image or Dockerfile.
See: https://docs.docker.com/engine/reference/builder/#workdir