I have a registered gitlab-runner with a docker executor. When it runs this .gitlab-ci.yml:
image: docker:latest
variables:
DOCKER_BUILDKIT: "1"
build:
stage: build
script:
# There are additional flags cut out requiring BuildKit.
- docker build .
and /var/run/docker.sock mounted, it fails with:
ERROR: docker.io/docker/dockerfile:experimental not found
------
> resolve image config for docker.io/docker/dockerfile:experimental:
------
failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: docker.io/docker/dockerfile:experimental not found
When I include
services:
- docker:dind
to .gitlab-ci.yml and remove the /var/run/docker.sock mount (so changing the daemon used to being the child container's instead of the host's), it succeeds.
Here is the Dockerfile:
# syntax=docker/dockerfile:experimental
...
Is there an incompatibility with BuildKit / experiment syntax and using the host's docker socket? I have it working with the child container using its own socket through dind, but I want to have this succeed with the socket mounted instead.