1. daemon-less 镜像构建工具
1.1 什么是 daemon-less 镜像构建工具
3.2 在 Docker 上运行 Kaniko
1
2
3
4
5
6
7
8
9
10
11
|
export AUTH=$(echo -n YOUR_USERNAME:YOUR_PASSWORD | base64 )
cat > config.json <<-EOF
{
"auths": {
"https://index.docker.io/v1/": {
"auth": "${AUTH}"
}
}
}
EOF
|
1
2
3
4
5
|
docker run
--interactive -v `pwd`/config.json:/kaniko/.docker/config.json gcr.io/kaniko-project/executor:latest
--context git://github.com/traefik/whoami
--dockerfile Dockerfile
--destination=shaowenchen/kaniko-demo:v1
|
参数说明:
- context, 构建需要的上下文。支持多种格式,S3、本地目录、标准输入、Git 仓库等
- dockerfile, Dockerfile 路径
- destination, 构建后推送的镜像地址