Skip to main content

NPM version PyPI version Release

cdk-kaniko

Build images with kaniko in AWS Fargate

About

cdk-kaniko is a CDK construct library that allows you to build images with kaniko in AWS Fargate. Inspired from the blog post - Building container images on Amazon ECS on AWS Fargate by Re Alvarez-Parmar and Olly Pomeroy, this library aims to abstract away all the infrastructure provisioning and configuration with minimal IAM policies required and allow you to focus on the high level CDK constructs. Under the covers, cdk-kaniko leverages the cdk-fargate-run-task so you can build the image just once or schedule the building periodically.

Install

Use the npm dist tag to opt in CDKv1 or CDKv2:

// for CDKv2
npm install cdk-kaniko
or
npm install cdk-kaniko@latest

// for CDKv1
npm install cdk-kaniko@cdkv1

Sample

# Example automatically generated from non-compiling source. May contain errors.
const app = new cdk.App();

const stack = new cdk.Stack(app, 'my-stack-dev');

const kaniko = new Kaniko(stack, 'KanikoDemo', {
  context: 'git://github.com/pahud/vscode.git',
  contextSubPath: './.devcontainer',
});

// build it once
kaniko.buildImage('once');

// schedule the build every day 0:00AM
kaniko.buildImage('everyday', Schedule.cron({
  minute: '0',
  hour: '0',
}));

fargate spot support

Use fargateSpot to enable the FARGATE_SPOT capacity provider to provision the fargate tasks.

# Example automatically generated from non-compiling source. May contain errors.
new Kaniko(stack, 'KanikoDemo', {
  context,
  contextSubPath,
  fargateSpot: true,
});

Note

Please note the image building could take some minutes depending on the complexity of the provided Dockerfile. On deployment completed, you can check and tail the AWS Fargate task logs from the AWS CloudWatch Logs to view all the build output.

Metadata

Release files for cdk-kaniko 2.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cdk-kaniko 2.0.7
File Size Uploaded
cdk-kaniko-2.0.7.tar.gz 33.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cdk-kaniko 2.0.7
File Interpreter ABI Platform
cdk_kaniko-2.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 65.3 kB

Release files / cdk-kaniko-2.0.7.tar.gz

Download URL cdk-kaniko-2.0.7.tar.gz
Size 33.3 kB
Tags Source
SHA-256 checksum
How to use checksums
24d0b091ede32898f35bf7a966eae0e4fa4f44619ae7a58b0260075e188d690c
BLAKE2b-256 checksum
How to use checksums
22c1d9e7410271732f5a4dd84a39e17258641b55291429f50957d4af20de8913
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

Release files / cdk_kaniko-2.0.7-py3-none-any.whl

Download URL cdk_kaniko-2.0.7-py3-none-any.whl
Size 32.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2bed0a24c2f1aa52a41edefc675ea1a5cf2cce87462b69a74730d792e477a360
BLAKE2b-256 checksum
How to use checksums
8cbb94fdb0896aba0992da787b6ea86f62184053bbff08d17e40660d99bd586d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.3

Release history Release notifications | RSS feed

This release

2.0.7 This release

2 release files

2.0.6

2 release files

2.0.5

2 release files

2.0.4

2 release files

2.0.3

2 release files

2.0.2

2 release files

2.0.1

2 release files

0.2.58

2 release files

0.2.57

2 release files

0.2.56

2 release files

0.2.52

2 release files

0.2.51

2 release files

0.2.50

2 release files

0.2.49

2 release files

0.2.48

2 release files

0.2.47

2 release files

0.2.46

2 release files

0.2.45

2 release files

0.2.44

2 release files

0.2.43

2 release files

0.2.39

2 release files

0.2.38

2 release files

0.2.37

2 release files

0.2.36

2 release files

0.2.35

2 release files

0.2.34

2 release files

0.2.33

2 release files

0.2.32

2 release files

0.2.31

2 release files

0.2.30

2 release files

0.2.29

2 release files

0.2.28

2 release files

0.2.27

2 release files

0.2.21

2 release files

0.2.20

2 release files

0.2.19

2 release files

0.2.18

2 release files

0.2.17

2 release files

0.2.16

2 release files

0.2.15

2 release files

0.2.14

2 release files

0.2.13

2 release files

0.2.10

2 release files

0.2.9

2 release files

0.2.8

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page