Docker Docker
Richard Mortier · May 06, 2017 · #old #docker #arm64Bootstrapping Docker for ARM64 (aka AARCH64)
Basic process is:
- bootstrap ARM64
go
toolchain on x86, and install - build ARM64
go1.7.5
toolchain needed fordocker
build - bootstrap ARM64
docker
v1.10.3 - use bootstrapped
docker
to provide containerised build environment for building later versions
Instructions below are for CentOS 7 for Reasons(tm). Package details and so on will vary on other distros.
Build go
bootstrap toolchain
On x86 host:
- build basic go1.4 sufficient to bootstrap
- cross-compile go1.7 (latest)
GOOS=linux GOARCH=arm64
- transfer cross-compiled toolchain to ARM64 host
Build ARM64 go1.7.5
- produce bootstrap toolchains
- use the bootstrap toolchain to build a modern
go
install
GOROOT_BOOTSTRAP= /go-linux-arm64-bootstrap
Bootstrap ARM64 Docker
- get a recent
git
- install dev dependencies
- clone source
- build components
( && for ; do ; done)
&&
Note that a current bug in Ubuntu packaging metadata means a small edit needs to be made to ./Dockerfile.aarch64
: change the apt-get update &&
to apt-get update ;
so that the build doesn’t stop at the first hurdle, updating packages.
- run daemon
# sudo rm -rf /var/lib/docker /etc/docker/config.json # DANGEROUS!
- run client to check
Build Docker
- reissue
make
using containerised build
Notes
- Resulting
17.05-dev
binaries fail due to missinglibapparmor.so
- Static binary build no longer supported?
DOCKER_BUILDTAGS
environment variable no longer supported?1.12.3
and1.13.1
also built- Build of RPM or DEB packages fails due, I think, to DIND not working