Docker buildkit support

docker --version
Docker version 18.06.1-ce, build e68fc7a
env DOCKER_BUILDKIT=1 docker build -t myimage .
buildkit not supported by daemon

buildkit was added in 18.06.0-ce
Is there a reason why buildkit is not supported?
Will it be soon?


You can install whatever Docker version you like :smile:

Assuming you are using CircleCI 2.0 or above, what build image are you using?

version: 2
    - image: circleci/node:8.11.4

    working_directory: ~/repo

    - checkout
    - setup_remote_docker:
        docker_layer_caching: true

    - run: env DOCKER_BUILDKIT=1 docker build -t myimage .

$ !/bin/bash -eo pipefail
env DOCKER_BUILDKIT=1 docker build -t myimage .
buildkit not supported by daemon Exited with code 1

question fixed

Coolio. So, it looks like the circleci/node:8.11.4 image has Docker built in.

If you don’t actually need Node, then you could just use one of these. For example, I have docker:17.05.0-ce-git in a lot of my projects. That’s too old for your case, but of course you can just bump up the version number.

If you wish to have Node as well, then of course you can add that. The Docker images are based on Alpine, so you’d do something like apk update && apk add nodejs. Of course, you can get an SSH session at any time to play around with some packages. You can do apk search <thing> to find out the names of things.

I don’t know what BuiltKit is, or whether it will work in Docker-in-Docker, but you can give it a go. Just a thought though - that error message makes me wonder if the version of Docker is already BuildKit aware, but it won’t work, since it is not in privileged mode. I suggest you find out what version this image is actually running.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.