Skip to content

A CDK construct to deploy docker image to Amazon ECR

License

Notifications You must be signed in to change notification settings

wchaws/cdk-ecr-deployment

 
 

Repository files navigation

cdk-ecr-deployment

Release npm version PyPI npm PyPI - Downloads

CDK construct to synchronize single docker image between docker registries.

⚠️ Please use ^1.0.0 for cdk version 1.x.x, use ^2.0.0 for cdk version 2.x.x

Features

  • Copy image from ECR/external registry to (another) ECR/external registry
  • Copy an archive tarball image from s3 to ECR/external registry

⚠️ Currently construct can authenticate to external registry only with basic auth, but credentials are put as plain text to template and logs. See issue #171.

Examples

Run test/integ.ecr-deployment.ts

NO_PREBUILT_LAMBDA=1 npx cdk deploy -a "npx ts-node -P tsconfig.dev.json --prefer-ts-exts test/integ.ecr-deployment.ts"

Tech Details & Contribution

The core of this project relies on containers/image which is used by Skopeo. Please take a look at those projects before contribution.

To support a new docker image source(like docker tarball in s3), you need to implement image transport interface. You could take a look at docker-archive transport for a good start.

To test the lambda folder, make test.

About

A CDK construct to deploy docker image to Amazon ECR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 77.4%
  • TypeScript 11.6%
  • JavaScript 7.1%
  • Dockerfile 1.7%
  • Makefile 1.4%
  • Shell 0.8%