Hi
Not sure if the error is with minikube or container-builder-local, but thought I'd post here first.
I'm seeing
2017/11/28 14:51:03 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
when running container-builder-local with the same Docker host as the minikube VM (On Mac, using xhyve driver).
More info
First I set up minikube on my Mac following the hello-node minikube tutorial.
I was able to set up minikube, and build the hello-node docker image following that tutorial using docker build. I was also able to build the same hello-node using container builder in the cloud no problem, and also got the container-builder-local working.
What I want to do is build the containers with the same Docker host as my minikube VM like the tutorial says, so that I can build locally using container-builder-local and have the images available in minikube. Unfortuantely I get an error which I'm hoping you can help me.
The hello-node minikube tutorial says:
Because this tutorial uses Minikube, instead of pushing your Docker image to a registry, you can simply build the image using the same Docker host as the Minikube VM, so that the images are automatically present. To do so, make sure you are using the Minikube Docker daemon:
eval $(minikube docker-env)
which does:
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.64.13:2376"
export DOCKER_CERT_PATH="/Users/mike/.minikube/certs"
export DOCKER_API_VERSION="1.23"
# Run this command to configure your shell:
# eval $(minikube docker-env)
So after I run eval $(minikube docker-env)
I can use the normal docker build commands from the tutorial to successfully build the hello-node image using the same Docker host as the Minikube VM.
However... when I use the following cloudbuild.yaml
steps:
- name: 'gcr.io/cloud-builders/docker'
args: [ 'build', '-t', 'gcr.io/$PROJECT_ID/hello-node-image', '.' ]
images:
- 'gcr.io/$PROJECT_ID/hello-node-image'
I can get it to work no problem for the cloud version of container-builder AND my regular docker host (using eval $(minikube docker-env -u)
to undo the switch to the minikube Docker host). But I get the following error when I run this line after switching to the minikube Docker host with eval $(minikube docker-env)
container-builder-local --config=cloudbuild.yaml --dryrun=false .
I get the following error:
2017/11/28 14:50:49 Warning: The server docker version installed (17.06.0-ce) is different from the one used in GCB (17.06.1-ce)
2017/11/28 14:50:49 Warning: The client docker version installed (17.09.0-ce) is different from the one used in GCB (17.06.1-ce)
Using default tag: latest
latest: Pulling from cloud-builders/metadata
Digest: sha256:3f52605df8532eca6aff1fa9d0cb035b07bfb68bedf0ffd5b919c84f41aa7685
Status: Image is up to date for gcr.io/cloud-builders/metadata:latest
2017/11/28 14:50:59 Started spoofed metadata server
2017/11/28 14:51:00 status changed to "BUILD"
BUILD
Pulling image: gcr.io/cloud-builders/docker
Unable to find image 'gcr.io/cloud-builders/docker:latest' locally
latest: Pulling from cloud-builders/docker
660c48dd555d: Already exists
4c7380416e78: Already exists
421e436b5f80: Already exists
e4ce6c3651b3: Already exists
be588e74bd34: Already exists
10d78c1521df: Pulling fs layer
3a9f6555ca9b: Pulling fs layer
2017/11/28 14:51:03 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:05 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:07 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:10 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:12 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:14 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
2017/11/28 14:51:16 Error updating token in metadata server: Post http://localhost:8082/token: dial tcp [::1]:8082: getsockopt: connection refused
I'v tried googling the error but didn't find anything. I've also made sure to run docker-credential-gcr configure-docker
and google auth login
but I get the same error. Would love to get this working so can use the same container-builder and kubectl commands locally and in production. Thanks in advance for any help.