rmatinata / multiarch-containers

Deploy a containers build environment, capable of producing containers for multiple architectures
MIT License
0 stars 0 forks source link

Multiarch containers builds on top of x86

The main goal of this project is to provide scripts that render a multi architecture container build environment, while respecting the following guidelines:

Installation

There are currently two major ways of deploying and configuring this environment:

All-in-one

The all-in-one mode requires that you only have the following, in the deployment node (ie your laptop, or some other machine):

The deployment node can be Linux, OS X and possibly Windows (although not tested, so far)

Assuming you meet these requirements, all you have to do is:

mkdir <some_location> ; cd <some_location> ; curl -L -O -s https://github.com/rmatinata/multiarch-containers/raw/master/Vagrantfile ; vagrant up

... then sit and wait for it to download the box, configure the guest and pull the appropriate example Docker container.

Provision to an existing Linux box

In case you already have a Linux machine or VM laying around, you can directly run the playbook. For that, you would need ansible to be installed and sudo powers. Just go ahead and:

git clone https://github.com/rmatinata/multiarch-containers.git
ansible-playbook ./multiarch-containers/playbook.yml

Applied usage and extension

If everything went well, you should get containers for each supported architecture, that you can work with in an x86 environment. The image tags follow the below pattern:

*-multiarch:<host_arch>_<arch>

... where:

From then on, you can base your Dockerfiles, out of these new base images. For instance, if you are trying to work with s390x containers, on an x86_64 machine, you would have something along these lines in your Dockerfile:

FROM s390x/debian-multiarch:x86_64_s390x
...

How to simply run it

If you are interesting in just using one of the pre-built containers, you can do something like this (assuming you are on x86_64):

# docker run -it --rm ppc64le/ubuntu-multiarch:x86_64_ppc64le /bin/bash
root@:/# uname -a
Linux 3.10.0-327.13.1.el7.x86_64 #1 SMP Thu Mar 31 16:04:38 UTC 2016 ppc64le ppc64le ppc64le GNU/Linux