Unable to start development container under moby/moby

Hi,

I’m following this guide https://github.com/moby/moby/blob/master/docs/contributing/set-up-dev-env.md and trying to setup a moby dev environment. In step 4 of the above URL, I execute the command

make BIND_DIR=. shell

and get the below error.

Makefile:152: The docker client CLI has moved to github.com/docker/cli. 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 --target=dev -t "docker-dev:firstbranch" -f "Dockerfile" .
buildkit not supported by daemon
Makefile:152: recipe for target 'build' failed
make: *** [build] Error 1

As mentioned in step 9, I went ahead to point the DOCKER_CLI_PATH variable to the correct docker cli binary. I built the Linux binary for the docker cli separately from docker/cli git repo. the command used to build the binary along with the output is as below.

$ make -f docker.Makefile binary
# build dockerfile from stdin so that we don't send the build-context; source is bind-mounted in the development environment
cat ./dockerfiles/Dockerfile.binary-native | docker build -t docker-cli-native -
Sending build context to Docker daemon  2.048kB
Step 1/5 : FROM    golang:1.12.4-alpine
---> b97a72b8e97d
Step 2/5 : RUN     apk add -U git bash coreutils gcc musl-dev
---> Using cache
---> 71e95c880af9
Step 3/5 : ENV     CGO_ENABLED=0         DISABLE_WARN_OUTSIDE_CONTAINER=1
---> Using cache
---> b3f3530e3fae
Step 4/5 : WORKDIR /go/src/github.com/docker/cli
---> Using cache
---> 01914ae74a3a
Step 5/5 : CMD     ./scripts/build/binary
---> Using cache
---> 00ba9f3c5368
Successfully built 00ba9f3c5368
Successfully tagged docker-cli-native:latest
docker run --rm -e VERSION=19.03.0-dev -e GITCOMMIT -e PLATFORM -e TESTFLAGS -e TESTDIRS -v "/home/niket/thesis/cli":/go/src/github.com/docker/cli -v "docker-cli-dev-cache:/root/.cache/go-build"  docker-cli-native
Building statically linked build/docker-linux-amd64

I found the newly created binary under /docker/cli/build/ named as docker-linux-amd64 as also clear from the logs above.

I followed step 9 in the guide https://github.com/moby/moby/blob/master/docs/contributing/set-up-dev-env.md and changed the path of the DOCKER_CLI_PATH

make DOCKER_CLI_PATH=/home/niket/thesis/cli/build/docker-linux-amd64 BIND_DIR=. shell
Makefile:152: The docker client CLI has moved to github.com/docker/cli. 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 --target=dev -t "docker-dev:firstbranch" -f "Dockerfile" .
buildkit not supported by daemon
Makefile:152: recipe for target 'build' failed
make: *** [build] Error 1

Can anyone help me in figuring out this problem and proceed further?

Seems like you are using a version of docker that does not have buildkit enabled.

You’ll need to specify DOCKER_BUILDKIT=0 along with your make call.

Brian Goff