The Docker server configuration CodeBuild use to build your Docker image.
Inheritance
DockerServerOptions
Implements
Inherited Members
Namespace: Amazon.CDK.AWS.CodeBuild
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class DockerServerOptions : IDockerServerOptions
Syntax (vb)
Public Class DockerServerOptions Implements IDockerServerOptions
Examples
Vpc vpc;
SecurityGroup mySecurityGroup;
new CodeBuildStep("Synth", new CodeBuildStepProps {
// ...standard ShellStep props...
Commands = new [] { },
Env = new Dictionary<string, object> { },
// If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
// to be the synth step's output.
PrimaryOutputDirectory = "cdk.out",
// Control the name of the project
ProjectName = "MyProject",
// Control parts of the BuildSpec other than the regular 'build' and 'install' commands
PartialBuildSpec = BuildSpec.FromObject(new Dictionary<string, object> {
{ "version", "0.2" }
}),
// Control the build environment
BuildEnvironment = new BuildEnvironment {
ComputeType = ComputeType.LARGE,
Privileged = true,
DockerServer = new DockerServerOptions {
ComputeType = DockerServerComputeType.SMALL,
SecurityGroups = new [] { mySecurityGroup }
}
},
Timeout = Duration.Minutes(90),
FileSystemLocations = new [] { FileSystemLocation.Efs(new EfsFileSystemLocationProps {
Identifier = "myidentifier2",
Location = "myclodation.mydnsroot.com:/loc",
MountPoint = "/media",
MountOptions = "opts"
}) },
// Control Elastic Network Interface creation
Vpc = vpc,
SubnetSelection = new SubnetSelection { SubnetType = SubnetType.PRIVATE_WITH_EGRESS },
SecurityGroups = new [] { mySecurityGroup },
// Control caching
Cache = Cache.Bucket(new Bucket(this, "Cache")),
// Additional policy statements for the execution role
RolePolicyStatements = new [] {
new PolicyStatement(new PolicyStatementProps { }) }
});
Synopsis
Constructors
Properties
Constructors
DockerServerOptions()
The Docker server configuration CodeBuild use to build your Docker image.
public DockerServerOptions()
Examples
Vpc vpc;
SecurityGroup mySecurityGroup;
new CodeBuildStep("Synth", new CodeBuildStepProps {
// ...standard ShellStep props...
Commands = new [] { },
Env = new Dictionary<string, object> { },
// If you are using a CodeBuildStep explicitly, set the 'cdk.out' directory
// to be the synth step's output.
PrimaryOutputDirectory = "cdk.out",
// Control the name of the project
ProjectName = "MyProject",
// Control parts of the BuildSpec other than the regular 'build' and 'install' commands
PartialBuildSpec = BuildSpec.FromObject(new Dictionary<string, object> {
{ "version", "0.2" }
}),
// Control the build environment
BuildEnvironment = new BuildEnvironment {
ComputeType = ComputeType.LARGE,
Privileged = true,
DockerServer = new DockerServerOptions {
ComputeType = DockerServerComputeType.SMALL,
SecurityGroups = new [] { mySecurityGroup }
}
},
Timeout = Duration.Minutes(90),
FileSystemLocations = new [] { FileSystemLocation.Efs(new EfsFileSystemLocationProps {
Identifier = "myidentifier2",
Location = "myclodation.mydnsroot.com:/loc",
MountPoint = "/media",
MountOptions = "opts"
}) },
// Control Elastic Network Interface creation
Vpc = vpc,
SubnetSelection = new SubnetSelection { SubnetType = SubnetType.PRIVATE_WITH_EGRESS },
SecurityGroups = new [] { mySecurityGroup },
// Control caching
Cache = Cache.Bucket(new Bucket(this, "Cache")),
// Additional policy statements for the execution role
RolePolicyStatements = new [] {
new PolicyStatement(new PolicyStatementProps { }) }
});
Properties
ComputeType
The type of compute to use for the docker server.
public DockerServerComputeType ComputeType { get; set; }
Property Value
SecurityGroups
A list of maximum 5 security groups.
public ISecurityGroup[]? SecurityGroups { get; set; }