Skip to main content

Python kaniko https://github.com/GoogleContainerTools/kaniko

Project description

Kaniko is a tool to build container images from a Dockerfile


How to install

For installation kaniko add in your Dockerfile the next lines

FROM gcr.io/kaniko-project/executor:v0.12.0 AS kaniko

FROM <your docker repo>

ENV DOCKER_CONFIG /kaniko/.docker

COPY --from=kaniko /kaniko /kaniko
...

pip

pip install kaniko

How to use:

from kaniko import Kaniko, KanikoSnapshotMode

kaniko = Kaniko()
kaniko.dockerfile = '/path/to/Dockerfile'
kaniko.no_push = True
kaniko.snapshot_mode = KanikoSnapshotMode.full

build_logs = kaniko.build()  # List[str]

Another way:

from kaniko import Kaniko, KanikoSnapshotMode

kaniko = Kaniko()
build_logs = kaniko.build(
    docker_registry_uri='https://index.docker.io/v1/',
    registry_username='username',
    registry_password='password',
    destination='path-to-repo:tag',
    dockerfile='/path/to/Dockerfile',
    snapshot_mode=KanikoSnapshotMode.full,
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pykaniko-1.1.0.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

pykaniko-1.1.0-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page