HowTo build dockerd/docker cli on ARM64v8 (Pine A64)

state: running

Update: fertige builds sind bei Docker.com erhältlich seit kurzem:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository    "deb [arch=arm64] https://download.docker.com/linux/ubuntu xenial stable"
apt-get install -y docker-ce

 

Using a Pina A64 2GB RAM board with Armbian 5.31 (Ubuntu 16.04.2 LTS)

start with:
apt-get install -y docker.io git-core btrfs-tools libsqlite3-dev libdevmapper-dev
cd /usr/src
git clone https://github.com/docker/docker
mv docker dockerd
cd dockerd
git checkout v17.05.0-ce
vi Dockerfile.aarch64
make binary

<This will take some time (minutes to hours)>

Then copy the files from "bundles/17.05.0-ce/binary-client" and "bundles/17.05.0-ce/binary-daemon" to "/usr/bin".

Done

 

For the dev version >17.05.0 (currently 17.06.0-dev and any further versions) the docker cli will be a seperate package.

For such a version do the same as above, but the only creates "dockerd" and related files.

To build "docker" to the following in addition to above (with version "master" instead):

cd /usr/src
git clone https://github.com/docker/cli
mv cli docker-cli
cd docker-cli
git checkout master
git pull
vi dockerfiles/Dockerfile.dev

Change
FROM    golang:1.8.3-alpine

to
FROM    intrepidde/golang:arm64-1.8.3

and
RUN     apk add -U git make bash coreutils
with

RUN     apt-get update ; apt-get install -f -y git make bash coreutils

(Or if you build your own go-container using my manual intrepidde/golang, the name of this container)

make -f docker.Makefile binary


Update: 20180723

Fertige Pakete auch für armhf (RPi) und arm64 (aarch64) gibt es jetzt auch direkt bei Docker:

apt-get install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository  "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce

Die Versionsnummern entsprechen dem "neuen" Versionsformat: <Jahr>-<Monat>-<Releasenummer>-ce
Also ist 18.06.0-ce der erste Release der CommunityEdition im Juni 2018.