Currently only amd64, i386 and arm (32) seem to be explicitly supported by this fork of docker. However I think it would be interesting to be able to use docker on a Raspberry Pi 4 running FreeBSD, for instance.
To make it work, a couple of arch specific files are missing in cli/vendor/golang.org/x/sys/unix, such as cli/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go for instance. Currently trying to build docker on a Raspberry Pi 4 running FreeBSD results in:
# (cd /usr/ports/sysutils/docker/work/src/github.com/docker; for t in github.com/docker/cli/cmd/docker; do out=$(/usr/bin/basename $(echo ${t} | /usr/bin/sed -Ee 's/^[^:]*:([^:]+).*$/\1/' -e 's/^\.$/docker/')); pkg=$(echo ${t} | /usr/bin/sed -Ee 's/^([^:]*).*$/\1/' -e 's/^docker$/./'); echo "===> Building ${out} from ${pkg}"; /usr/bin/env XDG_DATA_HOME=/usr/ports/sysutils/docker/work XDG_CONFIG_HOME=/usr/ports/sysutils/docker/work HOME=/usr/ports/sysutils/docker/work PATH=/usr/ports/sysutils/docker/work/.bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin NO_PIE=yes MK_DEBUG_FILES=no MK_KERNEL_SYMBOLS=no SHELL=/bin/sh NO_LINT=YES PREFIX=/usr/local LOCALBASE=/usr/local CC="cc" CFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " CPP="cpp" CPPFLAGS="" LDFLAGS=" -fstack-protector-strong " LIBS="" CXX="c++" CXXFLAGS="-O2 -pipe -fstack-protector-strong -fno-strict-aliasing " MANPREFIX="/usr/local" BSD_INSTALL_PROGRAM="install -s -m 555" BSD_INSTALL_LIB="install -s -m 0644" BSD_INSTALL_SCRIPT="install -m 555" BSD_INSTALL_DATA="install -m 0644" BSD_INSTALL_MAN="install -m 444" CGO_ENABLED=1 CGO_CFLAGS="-I/usr/local/include" CGO_LDFLAGS="-L/usr/local/lib" GOARM= GOPATH="/usr/ports/sysutils/docker/work" GOBIN="" GO111MODULE=off GOPROXY=off /usr/local/bin/go build -v -buildmode=exe -trimpath -ldflags=-s -o /usr/ports/sysutils/docker/work/bin/${out} ${pkg}; done)
===> Building docker from github.com/docker/cli/cmd/docker
github.com/docker/cli/vendor/golang.org/x/sys/unix
# github.com/docker/cli/vendor/golang.org/x/sys/unix
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:18:23: undefined: CAP_RIGHTS_VERSION_00
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:19:23: undefined: CAP_RIGHTS_VERSION_00
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:46:21: undefined: CapRights
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:50:24: undefined: CapRights
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:55:27: undefined: CapRights
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:90:29: undefined: CapRights
cli/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:12:6: missing function body
cli/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:13:6: missing function body
cli/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:14:6: missing function body
cli/vendor/golang.org/x/sys/unix/syscall_unix_gc.go:15:6: missing function body
cli/vendor/golang.org/x/sys/unix/cap_freebsd.go:90:29: too many errors
Currently only amd64, i386 and arm (32) seem to be explicitly supported by this fork of docker. However I think it would be interesting to be able to use docker on a Raspberry Pi 4 running FreeBSD, for instance.
To make it work, a couple of arch specific files are missing in
cli/vendor/golang.org/x/sys/unix, such ascli/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.gofor instance. Currently trying to build docker on a Raspberry Pi 4 running FreeBSD results in: