[![NPM version](https://badge.fury.io/js/cdk-kaniko.svg)](https://badge.fury.io/js/cdk-kaniko)
[![PyPI version](https://badge.fury.io/py/cdk-kaniko.svg)](https://badge.fury.io/py/cdk-kaniko)
[![Release](https://github.com/pahud/cdk-kaniko/actions/workflows/release.yml/badge.svg)](https://github.com/pahud/cdk-kaniko/actions/workflows/release.yml)
# `cdk-kaniko`
Build images with `kanilo` in **AWS Fargate**
# About
`cdk-kaniko` is a CDK construct library that allows you to build images with [**kaniko**](https://github.com/GoogleContainerTools/kaniko) in **AWS Fargate**. Inspired from the blog post - [Building container images on Amazon ECS on AWS Fargate](https://aws.amazon.com/tw/blogs/containers/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](https://github.com/pahud/cdk-fargate-run-task) so you can build the image just once or schedule the building periodically.
# Sample
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
app = cdk.App()
stack = cdk.Stack(app, "my-stack-dev")
kaniko = Kaniko(stack, "KanikoDemo",
context="git://github.com/pahud/vscode.git",
context_sub_path="./.devcontainer"
)
# build it once
kaniko.build_image("once")
# schedule the build every day 0:00AM
kaniko.build_image("everyday", Schedule.cron(
minute="0",
hour="0"
))
```
# fargate spot support
Use `fargateSpot` to enable the `FARGATE_SPOT` capacity provider to provision the fargate tasks.
```python
# Example automatically generated without compilation. See https://github.com/aws/jsii/issues/826
Kaniko(stack, "KanikoDemo",
context=context,
context_sub_path=context_sub_path,
fargate_spot=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.
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
共16个文件
txt:4个
py:3个
pkg-info:2个
资源分类:Python库 所属语言:Python 资源全名:cdk-kaniko-0.2.20.tar.gz 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059
资源推荐
资源详情
资源评论
收起资源包目录
cdk-kaniko-0.2.20.tar.gz (16个子文件)
cdk-kaniko-0.2.20
MANIFEST.in 23B
PKG-INFO 4KB
pyproject.toml 106B
LICENSE 11KB
src
cdk_kaniko
py.typed 1B
_jsii
cdk-kaniko@0.2.20.jsii.tgz 19KB
__init__.py 513B
__init__.py 9KB
cdk_kaniko.egg-info
PKG-INFO 4KB
requires.txt 256B
SOURCES.txt 374B
top_level.txt 11B
dependency_links.txt 1B
setup.cfg 38B
setup.py 2KB
README.md 2KB
共 16 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功