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
Metadata
Release files for repo2kaniko 0.1.0
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 |
|---|---|---|---|---|
| repo2kaniko-0.1.0.tar.gz | 11.9 kB | Without provenance | Details for repo2kaniko-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| repo2kaniko-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for repo2kaniko-0.1.0-py2.py3-none-any.whl |
Total release size: 18.6 kB
Release files / repo2kaniko-0.1.0.tar.gz
| Download URL | repo2kaniko-0.1.0.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e88a64bc5192c7a9ed580b0d3db96f4400766c9b9907a9e479e12d4f8d044cd
|
|
BLAKE2b-256 checksum How to use checksums |
ab9bf26442c789c9e305a1ce0e7281f2f212584fa0fab0caec6227382a9834d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / repo2kaniko-0.1.0-py2.py3-none-any.whl
| Download URL | repo2kaniko-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.7 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
25ab09bf57d8df9feae95d5277157e5227bb5fc9580e10bd39b7a4ddbf71f9b9
|
|
BLAKE2b-256 checksum How to use checksums |
0276467654c7eed5f81af5950808837efdf890a73f1b7e77e0abd969bb29ae69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Security for repo2kaniko 0.1.0
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.