[CentOS-devel] [altarch] multiarch docker images

Manfred Touron mtouron at scaleway.com
Thu Jan 14 17:02:32 UTC 2016


Yes you are,

However, Docker build system supports two kind of image manipulation:

- `FROM`, `COPY/ADD`, `ENV/LABEL`, `EXPOSE/VOLUME`, `CMD/ENTRYPOINT`, `ONBUILD`, `WORKDIR/USER`:
  direct filesystem manipulation from the Docker binary,
  it does not care about the architecture of the rootfs,
  you can even build an image without any binary inside

- `RUN yum install …` calls -> `/bin/sh -ec ‘yum install …’`
  relies on LXC,
  you need to run this on a host of the same architecture of the target,
  but, you are using the same Kernel, so `binfmt-support` is available


Here is an example of `Dockerfile` that can be built on any architecture and will always produce an x86_64 image:
https://github.com/CentOS/sig-cloud-instance-images/tree/CentOS-7/docker
and here an armhf image that can be built on any architecture: https://github.com/armbuild/alpine/tree/master/edge


If we achieve to get a tarball, i.e. using `livemedia-creator` we can build everything on an `x86_64` host.

If we still need to RUN some commands, we need an host of the target architecture with Docker or
`qemu-XXX-static` + `binfmt-support`.


--
Manfred Touron


> On 14 Jan 2016, at 17:13, Thierry Fauck at linux.vnet.ibm.com <thierry at linux.vnet.ibm.com> wrote:
> 
> On 14/01/2016 16:29, Manfred Touron wrote:
> > For now I failed to build the `ppc64` nor `ppc64le` images, but that's not a
> > priority.
> Manfred,
> If I am correct, docker is requiring golang packages which are not yet available for Centos 7.2 on ppc64/ppc64le.
> 
> --
> Thierry Fauck @ linux.vnet.ibm
> 
> _______________________________________________
> CentOS-devel mailing list
> CentOS-devel at centos.org
> https://lists.centos.org/mailman/listinfo/centos-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.centos.org/pipermail/centos-devel/attachments/20160114/cd00ce14/attachment.sig>


More information about the CentOS-devel mailing list