Date
1 - 4 of 4
Cf fails to push a docker image
Lucas Reginato
Hello,
My environment: - Windows 10 Pro 64 bits - VirtualBox 5.1.22 - PCF Dev pcfdev-v0.461.0.ova - Home nework, using a wifi router. I start my PCF Dev with the following command line: cf dev start I do not inform insecure docker registries as I assume that registry-1.docker.io is a secure one. I can submit any other application that uses a buildpack, but not docker images to my PCF Dev. And when I push the docker image cloudfoundry/test-app, it fails with the error message: C:\Temp\cf-docker-apps>cf push test-app --docker-image cloudfoundry/test-app Creating app test-app in org pcfdev-org / space pcfdev-space as admin... OK Creating route test-app.local.pcfdev.io... OK Binding test-app.local.pcfdev.io to test-app... OK Starting app test-app in org pcfdev-org / space pcfdev-space as admin... Creating container Successfully created container Staging... Staging process started ... Failed to talk to docker registry: Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) Failed to talk to docker registry: Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) Staging process failed: Exit trace for group: builder exited with error: failed to fetch metadata from [cloudfoundry/test-app] with tag [latest] and insecure registries [] due to Get http://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) Exit status 2 Staging Failed: Exited with status 2 Destroying container Successfully destroyed container FAILED Error restarting application: StagingError TIP: use 'cf logs test-app --recent' for more information Any tips fopr me? Thanks, -Lucas Reginato -- View this message in context: http://cf-dev.70369.x6.nabble.com/Cf-fails-to-push-a-docker-image-tp7761.html Sent from the CF Dev mailing list archive at Nabble.com. |
|
Lucas Reginato
I was taking a look into the error message and how to login to
registry-1.docker.io. In order to properly login, we need to follow the details of this webpage: https://docs.docker.com/registry/spec/auth/token/#requesting-a-token In a high level: - need to get a token at https://auth.docker.io/token with some query parameters. - then do the login again at registry-1.docker.io. - and then proceed to the next operations. Do we know if these steps are executed while pushing a docker image by PCF Dev? Thanks, -Lucas -- View this message in context: http://cf-dev.70369.x6.nabble.com/Cf-fails-to-push-a-docker-image-tp7761p7767.html Sent from the CF Dev mailing list archive at Nabble.com. |
|
George Lestaris
Hello Lucas,
CF takes care of authenticating (when needed) with the Docker registry. No need to run anything more than `cf push`. The output you included suggests that this was a network error on your side or Dockerhub was temporarily unavailable. If the problem persists, I'd suggest trying to use the same image from Dockerhub with Docker itself. If Docker works and CF doesn't, there may be a network connectivity issue with PCF Dev and/or Virtualbox. On Fri, Aug 18, 2017 at 10:00 AM, lucas.reginato <lucas.reginato(a)gmail.com> wrote: I was taking a look into the error message and how to login to -- George Lestaris GrootFS <https://www.github.com/cloudfoundry/grootfs> Product Manager, Cloud Foundry <https://www.cloudfoundry.org/>, Pivotal <https://www.pivotal.io/> |
|
Lucas Reginato
Hi George,
Thanks for quick reply. Yes, the image that I mentioned works just fine in my Docker VM, which also runs in VirtualBox. At office, I have 2 network connections (wifi), private a public. In both of them, I am facing the same issue. At home (wifi), I am also facing the same issue. Thanks, -Lucas Reginato On Fri, Aug 18, 2017 at 11:51 AM, George Lestaris <glestaris(a)pivotal.io> wrote: Hello Lucas, -- Lucas Reginato |
|