Build cross platform docker images
Switch branches/tags
Clone or download
Pull request Compare This branch is 15 commits ahead, 2 commits behind balena-io-library:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
build
dockerfile
qemu
tag
Dockerfile.tmpl
LICENCE
Makefile
README.md
images.go

README.md

dxbuild

dxbuild allows you to build non-amd64 containers on amd64. It currently uses small Debian images.

Working Golang compile chain is expected.

This is not my idea

See this blog post, I used the code here and forked it to this and cleaned it up a bit and made it possible support all k8s architectures.

This has been tested on Debian. You'll also need qemu installed, but this boils down on apt-get installing some things.

Each new image will be tagged with builder in it, except for amd64:

  • amd64 -> debian:stable-slim
  • arm -> arm32v7/debian-builder:stable-slim
  • arm64 -> arm64v8/debian-builder:stable-slim
  • ppc64le -> ppc64le/debian-builder:stable-slim
  • s390x -> s390x/debian-builder:stable-slim

Usage

% make        # build go binaries
% make docker # build all builder docker containers

We don't upload anything to the docker hub as we want to keep these local and just inherit from.

I.e. this is how you can use them:

FROM arm32v7/debian-builder:stable-slim

RUN [ "cross-build-start" ]

RUN apt-get update && apt-get install -y stunnel

RUN [ "cross-build-end" ]
RUN [ "cross-build-clean" ]