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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdk-kaniko-2.0.7.tar.gz | 33.3 kB | Without provenance | Details for cdk-kaniko-2.0.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdk_kaniko-2.0.7-py3-none-any.whl | Python 3 | none | any | Details for cdk_kaniko-2.0.7-py3-none-any.whl |
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
|
Security for cdk-kaniko 2.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.