Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A simple CLI to "multi-arch all the things"

Project description

kross

A simple CLI to "multi-arch all the things"

What is kross ?

kross is a tool to automate the build of Docker images for multiple architectures without any changes required on your code

Quick start

  • Install via pip

pip install kross

  • Initialize it (once)

kross init

  • Update your docker build commands

Before

docker build -t me/myapp:vX.X.X ...args... path/to/docker/context
docker push me/myapp:vX.X.X

After

kross build -t me/myapp:vX.X.X ...args... path/to/docker/context
kross push me/myapp:vX.X.X

Why kross ?

Kross is born from a Raspberry Pi passionnate developer. Because Raspberry Pi are arm-based and 90% of images on Dockerhub are amd64-based, developers have to duplicate/tweak all Dockerfiles so the image will work on it and avoid the too much popular cannot execute binary file: Exec format error.

To know more, read the full article.

How kross is working ?

kross is based upon the qemu library to build multiple architectures images on a amd64-based host machine. After all images are built and pushed to a docker registry, a manifest list is pushed too so that users can pull images based on their architectures in a seamless way.

Supported architectures

kross will try to build images for the following architectures:

  • amd64
  • arm32v6
  • arm32v7
  • arm64v8
  • ppc64le
  • s390x
  • i386

Run the example

  • Install kross pip install kross

  • Check your machine configuration kross init

  • Run the kross build kross build -t kross-world:v0.1.0 https://raw.githubusercontent.com/pcorbel/kross/master/docs/example/Dockerfile

  • Run the kross push kross push kross-world:v0.1.0

  • Check images availability on your Dockerhub account

  • Run your image anywhere

docker run --rm kross-world:v0.1.0

Example image available here

Tips and tricks

To know exactly what is happening while kross is working export KROSS_VERBOSE=true

Project details


Download files

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

Files for kross, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size kross-1.0.4-py2-none-any.whl (9.3 MB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size kross-1.0.4-py3-none-any.whl (9.3 MB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size kross-1.0.4.tar.gz (9.3 MB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page