Cross building Docker for armv7 in Ubuntu 20.04

21 views
Skip to first unread message

Mikko Kiilholma

unread,
Sep 24, 2021, 5:46:22 AM9/24/21
to docker-dev
Hi,
My name  is Mikko, I am software developer from Tampere, Finland.

I am trying to build Docker release 18.09.9 in Ubuntu 20.04.
I use command: sudo make DOCKER_CROSSPLATFORMS=linux/arm/v7 cross
... but it fails:

 => ERROR [gotestsum 3/3] RUN PREFIX=/build ./install.sh gotestsum
------
 > [gotestsum 3/3] RUN PREFIX=/build ./install.sh gotestsum:
#27 2.453 + RM_GOPATH=0
#27 2.453 + TMP_GOPATH=
#27 2.453 + : /build
#27 2.453 + '[' -z '' ']'
#27 2.454 ++ mktemp -d
#27 2.455 + export GOPATH=/tmp/tmp.3BKIwbdYJf
#27 2.455 + GOPATH=/tmp/tmp.3BKIwbdYJf
#27 2.455 + RM_GOPATH=1
#27 2.455 ++ dirname ./install.sh
#27 2.458 + dir=.
#27 2.458 + bin=gotestsum
#27 2.458 + shift
#27 2.458 + '[' '!' -f ./gotestsum.installer ']'
#27 2.458 + . ./gotestsum.installer
#27 2.467 ++ GOTESTSUM_COMMIT=v0.3.5
#27 2.467 + install_gotestsum
#27 2.467 + echo 'Installing gotestsum version v0.3.5'
#27 2.467 + go get -d gotest.tools/gotestsum
#27 2.467 Installing gotestsum version v0.3.5
#27 80.96 + cd /tmp/tmp.3BKIwbdYJf/src/gotest.tools/gotestsum
#27 80.97 + git checkout -q v0.3.5
#27 81.09 + go build -buildmode=pie -o /build/gotestsum gotest.tools/gotestsum
#27 81.60 handler.go:8:2: cannot find package "github.com/sirupsen/logrus" in any of:
#27 81.60       /usr/local/go/src/github.com/sirupsen/logrus (from $GOROOT)
#27 81.60       /tmp/tmp.3BKIwbdYJf/src/github.com/sirupsen/logrus (from $GOPATH)
#27 81.60 main.go:14:2: cannot find package "github.com/spf13/pflag" in any of:
#27 81.60       /usr/local/go/src/github.com/spf13/pflag (from $GOROOT)
#27 81.60       /tmp/tmp.3BKIwbdYJf/src/github.com/spf13/pflag (from $GOPATH)
------
executor failed running [/bin/sh -c PREFIX=/build ./install.sh $INSTALL_BINARY_NAME]: exit code: 1
make: *** [Makefile:144: build] Error 1

How can I fix this?

I have tried the prebuilt binaries of the release from https://download.docker.com/linux/static/stable/armhf/ 
But it does not start. It tries to create folder /opt but it is read only in my system.
This is why I try to do some changes and build it myself.

- Mikko
Reply all
Reply to author
Forward
0 new messages