Docker builds are broken if buildkit is used (DOCKER_BUILDKIT=1)

After the upgrade
all docker builds stopped working at once, as we have to use buildkit to passthrough the ssh-agent.

How to reproduce:

  1. Create the Dockerfile
# syntax=docker/dockerfile:1.0.0-experimental
FROM node:8-alpine
  1. Try to build it with DOCKER_BUILDKIT=1 docker build -t test .
  2. Get a very subtle error
#3 resolve image config for
#3       digest: sha256:225ddc2c45be66b63dfcfb873b0d39a2fe4d12bf16cbd5a14f411b724fb674c8
#3         name: "resolve image config for"
#3      started: 2019-04-11 23:13:58.29101229 +0000 UTC
#3    completed: 2019-04-11 23:13:58.581553479 +0000 UTC
#3     duration: 290.541189ms
#3        error: " not found" not found

Solution: Removing the from mirrors helps. Just do echo "{}" > /etc/docker/daemon.json.

Here is the relevant issue:

@ekini I also ran into this problem, and edit /etc/docker/daemon.json is forbidden by travisCI, do you have any workaround now?

@youyongsong I don’t think it’s forbidden. Just use sudo and it should work.

I have tried sudo, it’s still forbidden to edit or cat. I’m now using buildkit daemon + buildctl in travis:

  - sudo docker run -d --privileged -p 1234:1234 --name buildkit moby/buildkit:latest --addr tcp://
  - sudo docker cp buildkit:/usr/bin/buildctl /usr/bin/
  - export BUILDKIT_HOST=tcp://

  - stage: "test and build"
    - buildctl build --frontend dockerfile.v0 --local context=. --local dockerfile=. --opt target=ci
1 Like