-
Notifications
You must be signed in to change notification settings - Fork 632
Closed
Description
I've been using docker:17 and docker:17-dind for some time now to run DIND builds within Gitlab Runners. Recently I rebuilt my images that extend on them (for the purposes of trusting self-signed certificates) to use docker:17.07.0 and docker:17.07.0-dind and began to receive the following errors executing Docker CLI commands:
$ docker build -t test .
ERRO[0000] failed to dial gRPC: unable to upgrade to h2c, received 501
Reproduction is simple:
# Set up DIND to demo
$ docker run --rm --name=dind --privileged -it docker:17.07.0-dind
# In new terminal window
# Demo 501 failure with 17.07.0 docker to 17.07.0 dind
$ docker run -it --link dind -e DOCKER_HOST=tcp://dind:2375/ docker:17.07.0 sh -c 'cd /tmp; echo FROM alpine > Dockerfile; docker build -t test .'
Sending build context to Docker daemon 2.048kB
ERRO[0000] failed to dial gRPC: unable to upgrade to h2c, received 501
context canceled
What revealed the reason for this problem to me was the following output from the DIND container:
...
ERRO[0097] Handler for POST /session returned error: This experimental feature is disabled by default. Start the Docker daemon in experimental mode in order to enable it.
ERRO[0097] Handler for POST /build returned error: no active session for 9acfb9acfb9acfb9acfb9acfb9acfb9: context canceled
...
This problem is also seen when using docker:17.06.0 with docker:17.07.0-dind, but it is less obvious as the DIND output doesn't indicate anything happening as I assume API handlers do not exist for those endpoints.
# Set up DIND to demo
$ docker run --rm --name=dind --privileged -it docker:17-dind
# In new terminal window
# Demo 404 failure with 17.07.0 docker to 17-dind (17.06.0 presently)
$ docker run -it --link dind -e DOCKER_HOST=tcp://dind:2375/ docker:17.07.0 sh -c 'cd /tmp; echo FROM alpine > Dockerfile; docker build -t test .'
Sending build context to Docker daemon 2.048kB
ERRO[0000] failed to dial gRPC: unable to upgrade to h2c, received 404
context canceled
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels