class S3DockerfileData
| Language | Type name |
|---|---|
.NET | Amazon.CDK.AWS.ImageBuilder.Alpha.S3DockerfileData |
Go | github.com/aws/aws-cdk-go/awsimagebuilderalpha/v2#S3DockerfileData |
Java | software.amazon.awscdk.services.imagebuilder.alpha.S3DockerfileData |
Python | aws_cdk.aws_imagebuilder_alpha.S3DockerfileData |
TypeScript (source) | @aws-cdk/aws-imagebuilder-alpha ยป S3DockerfileData |
Extends
Dockerfile
Obtainable from
Dockerfile.fromAsset(), Dockerfile.fromS3()
Helper class for S3-based dockerfile data references, containing additional permission grant methods on the S3 object.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as imagebuilder_alpha from '@aws-cdk/aws-imagebuilder-alpha';
import * as cdk from 'aws-cdk-lib';
import { aws_iam as iam } from 'aws-cdk-lib';
import { aws_kms as interfaces_kms } from 'aws-cdk-lib/interfaces';
declare const dockerImage: cdk.DockerImage;
declare const grantable: iam.IGrantable;
declare const keyRef: interfaces_kms.IKeyRef;
declare const localBundling: cdk.ILocalBundling;
const s3DockerfileData = imagebuilder_alpha.S3DockerfileData.fromAsset(this, 'MyS3DockerfileData', 'path', /* all optional props */ {
assetHash: 'assetHash',
assetHashType: cdk.AssetHashType.SOURCE,
bundling: {
image: dockerImage,
// the properties below are optional
bundlingFileAccess: cdk.BundlingFileAccess.VOLUME_COPY,
command: ['command'],
entrypoint: ['entrypoint'],
environment: {
environmentKey: 'environment',
},
local: localBundling,
network: 'network',
outputType: cdk.BundlingOutput.ARCHIVED,
platform: 'platform',
securityOpt: 'securityOpt',
user: 'user',
volumes: [{
containerPath: 'containerPath',
hostPath: 'hostPath',
// the properties below are optional
consistency: cdk.DockerVolumeConsistency.CONSISTENT,
}],
volumesFrom: ['volumesFrom'],
workingDirectory: 'workingDirectory',
},
deployTime: false,
displayName: 'displayName',
exclude: ['exclude'],
followSymlinks: cdk.SymlinkFollowMode.NEVER,
ignoreMode: cdk.IgnoreMode.GLOB,
readers: [grantable],
sourceKMSKey: keyRef,
});
Initializer (protected)
super(bucket: IBucket, key: string)
Parameters
- bucket
IBucket - key
string
Properties
| Name | Type | Description |
|---|---|---|
| bucket | IBucket | |
| key | string |
bucket
Type:
IBucket
key
Type:
string
Methods
| Name | Description |
|---|---|
| grant | Grant put permissions to the given grantee for the dockerfile data in S3. |
| grant | Grant read permissions to the given grantee for the dockerfile data in S3. |
| render() | The rendered Dockerfile S3 URL, for use in CloudFormation. |
grantPut(grantee)
public grantPut(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ The principal.
Returns
Grant put permissions to the given grantee for the dockerfile data in S3.
grantRead(grantee)
public grantRead(grantee: IGrantable): Grant
Parameters
- grantee
IGrantableโ The principal.
Returns
Grant read permissions to the given grantee for the dockerfile data in S3.
render()
public render(): DockerfileTemplateConfig
Returns
The rendered Dockerfile S3 URL, for use in CloudFormation.

.NET
Go
Java
Python
TypeScript (