Repo2docker Kaniko builder
Project description
repo2kaniko
repo2kaniko is a plugin for repo2docker that lets you use Kaniko instead of Docker.
Kaniko must run in a container, can only build images, and can only store images in a registry. It has the big advantage that it i completely unprivileged and doesn't require any host configuration, unlike e.g. Podman which requires your system to have the correct cgroups configuration.
It does not use a local Docker store, so it is not possible to separate the build and push steps.
This means the repo2docker --push/--no-push arguments have no effect.
The default in this plugin is to automatically push the image to a registry after it is built.
Set Traitlet KanikoEngine.push_image=False or environment variable KANIKO_PUSH_IMAGE=0 to disable pushing the image.
Kaniko does not cache layers locally, instead it uses a registry for caching.
You should probably use a dedicated local private registry for speed and not the remote registry used for storing the built image.
Use KanikoEngine.cache_registry_credentials or KANIKO_CACHE_REGISTRY_CREDENTIALS to specify the credentials for the cache registry.
These behave similarly to ContainerEngine.registry_credentials and CONTAINER_ENGINE_REGISTRY_CREDENTIALS.
Running
podman run -it --rm quay.io/manics/repo2kaniko \
repo2docker --debug --engine=kaniko \
--Repo2Docker.user_id=1000 --user-name=jovyan \
--KanikoEngine.registry_credentials=registry=quay.io \
--KanikoEngine.registry_credentials=username=quay-user \
--KanikoEngine.registry_credentials=password=quay-password \
--image-name=quay.io/quay-user/r2d-test \
--no-run \
https://github.com/binderhub-ci-repos/minimal-dockerfile
With a local registry that can be used as a cache:
./run-local-registry.sh
REGISTRY=...
podman run -it --rm quay.io/manics/repo2kaniko \
repo2docker --debug --engine=kaniko \
--Repo2Docker.user_id=1000 --user-name=jovyan \
--KanikoEngine.cache_registry=$REGISTRY/cache \
--KanikoEngine.cache_registry_credentials=username=user \
--KanikoEngine.cache_registry_credentials=password=password \
--KanikoEngine.cache_registry_insecure=true \
--image-name=$REGISTRY/r2d-test \
--no-run \
https://github.com/binderhub-ci-repos/minimal-dockerfile
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file repo2kaniko-0.1.0.tar.gz.
File metadata
- Download URL: repo2kaniko-0.1.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e88a64bc5192c7a9ed580b0d3db96f4400766c9b9907a9e479e12d4f8d044cd
|
|
| MD5 |
8cfe58ea3611431dd8b1d5523343d803
|
|
| BLAKE2b-256 |
ab9bf26442c789c9e305a1ce0e7281f2f212584fa0fab0caec6227382a9834d7
|
File details
Details for the file repo2kaniko-0.1.0-py2.py3-none-any.whl.
File metadata
- Download URL: repo2kaniko-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/4.0.2 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25ab09bf57d8df9feae95d5277157e5227bb5fc9580e10bd39b7a4ddbf71f9b9
|
|
| MD5 |
f0437f76f919ad0322dba81f5f01a161
|
|
| BLAKE2b-256 |
0276467654c7eed5f81af5950808837efdf890a73f1b7e77e0abd969bb29ae69
|