repo2kaniko


Namerepo2kaniko JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/manics/repo2kaniko
SummaryRepo2docker Kaniko builder
upload_time2023-11-11 22:24:32
maintainer
docs_urlNone
authorSimon Li
requires_python>=3.8
licenseBSD
keywords reproducible science environments docker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # repo2kaniko

[![Build Status](https://github.com/manics/repo2kaniko/actions/workflows/build.yml/badge.svg)](https://github.com/manics/repo2kaniko/actions/workflows/build.yml)
[![Container repository](https://img.shields.io/badge/quay.io-container-purple)](https://quay.io/repository/manics/repo2kaniko?tab=tags)

`repo2kaniko` is a plugin for [repo2docker](http://repo2docker.readthedocs.io) that lets you use [Kaniko](https://github.com/GoogleContainerTools/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
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/manics/repo2kaniko",
    "name": "repo2kaniko",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "reproducible science environments docker",
    "author": "Simon Li",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ab/9b/f26442c789c9e305a1ce0e7281f2f212584fa0fab0caec6227382a9834d7/repo2kaniko-0.1.0.tar.gz",
    "platform": null,
    "description": "# repo2kaniko\n\n[![Build Status](https://github.com/manics/repo2kaniko/actions/workflows/build.yml/badge.svg)](https://github.com/manics/repo2kaniko/actions/workflows/build.yml)\n[![Container repository](https://img.shields.io/badge/quay.io-container-purple)](https://quay.io/repository/manics/repo2kaniko?tab=tags)\n\n`repo2kaniko` is a plugin for [repo2docker](http://repo2docker.readthedocs.io) that lets you use [Kaniko](https://github.com/GoogleContainerTools/kaniko) instead of Docker.\n\nKaniko must run in a container, can only build images, and can only store images in a registry.\nIt 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.\n\nIt does not use a local Docker store, so it is not possible to separate the build and push steps.\n**This means the repo2docker `--push`/`--no-push` arguments have no effect.**\nThe default in this plugin is to automatically push the image to a registry after it is built.\nSet Traitlet `KanikoEngine.push_image=False` or environment variable `KANIKO_PUSH_IMAGE=0` to disable pushing the image.\n\nKaniko does not cache layers locally, instead it uses a registry for caching.\nYou should probably use a dedicated local private registry for speed and not the remote registry used for storing the built image.\nUse `KanikoEngine.cache_registry_credentials` or `KANIKO_CACHE_REGISTRY_CREDENTIALS` to specify the credentials for the cache registry.\nThese behave similarly to `ContainerEngine.registry_credentials` and `CONTAINER_ENGINE_REGISTRY_CREDENTIALS`.\n\n## Running\n\n```\npodman run -it --rm quay.io/manics/repo2kaniko \\\n    repo2docker --debug --engine=kaniko \\\n    --Repo2Docker.user_id=1000 --user-name=jovyan \\\n    --KanikoEngine.registry_credentials=registry=quay.io \\\n    --KanikoEngine.registry_credentials=username=quay-user \\\n    --KanikoEngine.registry_credentials=password=quay-password \\\n    --image-name=quay.io/quay-user/r2d-test \\\n    --no-run \\\n    https://github.com/binderhub-ci-repos/minimal-dockerfile\n```\n\nWith a local registry that can be used as a cache:\n\n```\n./run-local-registry.sh\nREGISTRY=...\npodman run -it --rm quay.io/manics/repo2kaniko \\\n    repo2docker --debug --engine=kaniko \\\n    --Repo2Docker.user_id=1000 --user-name=jovyan \\\n    --KanikoEngine.cache_registry=$REGISTRY/cache \\\n    --KanikoEngine.cache_registry_credentials=username=user \\\n    --KanikoEngine.cache_registry_credentials=password=password \\\n    --KanikoEngine.cache_registry_insecure=true \\\n    --image-name=$REGISTRY/r2d-test \\\n    --no-run \\\n    https://github.com/binderhub-ci-repos/minimal-dockerfile\n```\n",
    "bugtrack_url": null,
    "license": "BSD",
    "summary": "Repo2docker Kaniko builder",
    "version": "0.1.0",
    "project_urls": {
        "Documentation": "https://repo2docker.readthedocs.io",
        "Homepage": "https://github.com/manics/repo2kaniko"
    },
    "split_keywords": [
        "reproducible",
        "science",
        "environments",
        "docker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0276467654c7eed5f81af5950808837efdf890a73f1b7e77e0abd969bb29ae69",
                "md5": "f0437f76f919ad0322dba81f5f01a161",
                "sha256": "25ab09bf57d8df9feae95d5277157e5227bb5fc9580e10bd39b7a4ddbf71f9b9"
            },
            "downloads": -1,
            "filename": "repo2kaniko-0.1.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f0437f76f919ad0322dba81f5f01a161",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.8",
            "size": 6696,
            "upload_time": "2023-11-11T22:24:31",
            "upload_time_iso_8601": "2023-11-11T22:24:31.709002Z",
            "url": "https://files.pythonhosted.org/packages/02/76/467654c7eed5f81af5950808837efdf890a73f1b7e77e0abd969bb29ae69/repo2kaniko-0.1.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab9bf26442c789c9e305a1ce0e7281f2f212584fa0fab0caec6227382a9834d7",
                "md5": "8cfe58ea3611431dd8b1d5523343d803",
                "sha256": "8e88a64bc5192c7a9ed580b0d3db96f4400766c9b9907a9e479e12d4f8d044cd"
            },
            "downloads": -1,
            "filename": "repo2kaniko-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8cfe58ea3611431dd8b1d5523343d803",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11948,
            "upload_time": "2023-11-11T22:24:32",
            "upload_time_iso_8601": "2023-11-11T22:24:32.936237Z",
            "url": "https://files.pythonhosted.org/packages/ab/9b/f26442c789c9e305a1ce0e7281f2f212584fa0fab0caec6227382a9834d7/repo2kaniko-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-11 22:24:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "manics",
    "github_project": "repo2kaniko",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "repo2kaniko"
}
        
Elapsed time: 0.21279s