Kaniko - GradedJestRisk/cicd-training GitHub Wiki
kaniko is a tool to build container images from a Dockerfile (inside a container or Kubernetes cluster)
https://github.com/GoogleContainerTools/kaniko/blob/main/docs/tutorial.md
docker pull gcr.io/kaniko-project/executor:latest
To build an image :
- locally (no push to an image repository)
- from
Dockerfile
in the current directory
IMAGE=<IMAGE> BUILD_ARG=<BUILD-ARG>\
docker run --rm \
--volume $PWD:/workspace \
--workdir /workspace \
gcr.io/kaniko-project/executor:latest \
--dockerfile Dockerfile \
--context /workspace \
--destination $IMAGE \
--build-arg $BUILD_ARG \
--no-push
docker run --rm
--volume $PWD:/workspace
--workdir /workspace
gcr.io/kaniko-project/executor:latest
--dockerfile Dockerfile
--context /workspace
--destination ptm-visualisation:test
--skip-push-permission-check