GithubHelp home page GithubHelp logo

pcorbel / kross Goto Github PK

View Code? Open in Web Editor NEW
7.0 1.0 0.0 9.72 MB

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

License: Apache License 2.0

Python 100.00%
docker arm amd64 i386 s390x ppc64le arm64

kross's Introduction

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

kross's People

Contributors

pcorbel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.