@cloudcomponents/cdk-container-registry
v2.4.0
Published
Registry for container images
Downloads
1,062
Maintainers
Readme
@cloudcomponents/cdk-container-registry
Registry for container images
Install
TypeScript/JavaScript:
npm i @cloudcomponents/cdk-container-registry
Python:
pip install cloudcomponents.cdk-container-registry
How to use
import { ImageRepository, Severity } from '@cloudcomponents/cdk-container-registry';
import { Stack, StackProps } from 'aws-cdk-lib';
import { Topic } from 'aws-cdk-lib/aws-sns';
import { EmailSubscription } from 'aws-cdk-lib/aws-sns-subscriptions';
import { Construct } from 'constructs';
export class ImageRepositoryStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const alarmTopic = new Topic(this, 'Topic');
alarmTopic.addSubscription(
new EmailSubscription(process.env.DEVSECOPS_TEAM_EMAIL as string),
);
const imageRepository = new ImageRepository(this, 'ImageRepository', {
forceDelete: true, //Only for tests
imageScanOnPush: true,
});
imageRepository.onFinding('finding', {
severity: Severity.HIGH,
alarmTopic,
});
}
}
API Reference
See API.md.
Example
See more complete examples.