Docker Community Forums

Share and learn in the Docker community.

Build docker-ce from moby

Hi, I’m trying to understand the process of installing docker from source by building the binary from the code on github instead of directly downloading and using the .deb file available. I cloned moby/moby repo and executed the ‘make binary’ command. I get this error:

mkdir bundles
Makefile:152: The docker client CLI has moved to For a dev-test cycle involving the CLI, run:
DOCKER_CLI_PATH=/host/path/to/cli/binary make shell
then change the cli and compile into a binary at the same location.

DOCKER_BUILDKIT=“1” docker build --build-arg=CROSS=false -t “docker-dev:master” -f “Dockerfile” .
buildkit not supported by daemon
Makefile:152: recipe for target ‘build’ failed
make: *** [build] Error 1

Firstly, is this the correct approach? If yes, can anyone point out if I missed something that led to this error?

System Details:
OS: Ubuntu 16.04.6 (xenial)
Kernel : 4.15.0-47-generic
Docker version 18.06.1-ce

You could either try enabling buildkit from your daemon.conf file ( have a look here) :

Add the following to /etc/docker/daemon.json, and restart the daemon

{ "features": { "buildkit": true } }

Or you could run the make command without buildkit (which will make docker use the traditional image build tool) by running make command with this argument:

make DOCKER_BUILDKIT=0 binary

(You might have to edit your Makefile and pass proxy as build arguments if your internet connection goes through a proxy)

1 Like