Skip to main content

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

Project description

Paniko

Paniko is a Python wrapper for Google's Kaniko. Kaniko is a command line utility that enables the building of container images within environments that can't easily or securely run a Docker daemon. This includes building images within a Kubernetes Pod or serverless infrastructure such as AWS's Fargate.

It includes the most updated Kaniko commands and streaming of Kaniko's outputs.

This package builds off of Timofey's pykaniko package.


Install

For installation kaniko add in your Dockerfile the next lines

pip install git+https://github.com/wfclark5/paniko.git
#Dockerfile
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
...

Usage

from paniko 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',
    force=True,
    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

paniko-1.0.1.tar.gz (9.4 kB view hashes)

Uploaded Source

Built Distribution

paniko-1.0.1-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