elastic-ci-stack-for-aws icon indicating copy to clipboard operation
elastic-ci-stack-for-aws copied to clipboard

docker buildkit support - e.g ssh-agent mounting

Open troxil opened this issue 5 years ago • 0 comments

Hi,

With DOCKER_EXPERIMENTAL you get experimental mode enabled in the daemon.json. But when starting builds that use that feature it seems to fail with an strange error.

Example build DOCKER_BUILDKIT=1 docker build --ssh default . -t "build-utils"

I get a failure message like this one: failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: exit code: 1

Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal dockerd[8044]: container_linux.go:345: starting container process caused "process_linux.go:430: container init caused \"rootfs_linux.go:58: mounting \\\"/run/runc/ivf3en8xo8fjnm13nsds8fzzp/notify.sock\\\" to rootfs \\\"/var/lib/docker/2000.1001/buildkit/executor/ivf3en8xo8fjnm13nsds8fzzp/rootfs\\\" at \\\"/run/systemd/notify\\\" caused \\\"stat /run/runc/ivf3en8xo8fjnm13nsds8fzzp/notify.sock: permission denied\\\"\""
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal dockerd[8044]: time="2020-02-17T12:09:16.389466460Z" level=warning msg="grpc: addrConn.createTransport failed to connect to { 0  <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal dockerd[8044]: time="2020-02-17T12:09:16.389544529Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc000e428f0, TRANSIENT_FAILURE" module=grpc
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal dockerd[8044]: time="2020-02-17T12:09:16.389571075Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc000e428f0, CONNECTING" module=grpc
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal dockerd[8044]: time="2020-02-17T12:09:16.389588781Z" level=info msg="pickfirstBalancer: HandleSubConnStateChange: 0xc000e428f0, TRANSIENT_FAILURE" module=grpc
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal kernel: docker0: port 1(veth004c433) entered disabled state
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal kernel: device veth004c433 left promiscuous mode
Feb 17 12:09:16 ip-10-200-46-217.ap-southeast-2.compute.internal kernel: docker0: port 1(veth004c433) entered disabled state

Dockerfile contents:

# syntax=docker/dockerfile:1.0.0-experimental

FROM python:3.7-alpine
# this won't do anything interesting, just for illustration purposes.
RUN --mount=type=ssh pip3 install boto3

I can however stop the docker service and just run my own dockerd and it works.

Edit; Looks like this is related

  • https://github.com/moby/moby/issues/39866
  • resolved in 19.03.3 https://github.com/docker/engine/pull/373

troxil avatar Feb 17 '20 05:02 troxil