Question

Unable to push to Container Registry

Hi, I am new here to the community and DigitalOcean. Recently I have been trying out the container registry just to see how it works. But I seem to be having problem publishing to it even after following the steps from digitalocean.

  1. I have created a API token with read/write permission.
  2. I have logged in to my docker CLI using docker login registry.digitalocean.com and put the API key for username and password.
  3. I have tagged my container naming it “registry.digitalocean.com/twn-myapp/my-app:v1.0
  4. My computer firewall is disabled

However, when I push to the registry, I get dial tcp 0.0.0.0:443: connect: connection refused.

I don’t have this issue when I use Amazon’s ECR. Any idas whats going one? Here is the command I issued.

sheenlim08@lpt-linuxmint01:~/Learning/developing-with-docker/app$ docker push registry.digitalocean.com/twn-myapp/my-app:v1.0
The push refers to repository [registry.digitalocean.com/twn-myapp/my-app]
704b0df6b9fa: Pushing [==================================================>]   6.29MB
5f70bf18a086: Pushing  1.024kB
9bd6beefab12: Retrying in 1 second 
40761ef8f3e7: Pushing  3.072kB
629960860aca: Pushing [==================================================>]  3.584kB
f019278bad8b: Retrying in 5 seconds 
8ca4f4055a70: Pushing [============================================>      ]  89.17MB/101.2MB
3e207b409db3: Pushing [==================================================>]  5.879MB
dial tcp 0.0.0.0:443: connect: connection refused

and below are the logs it generated.

sheenlim08@lpt-linuxmint01:~$ journalctl -u docker | tail -f
Apr 05 18:02:23 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:23.965741660+08:00" level=error msg="Upload failed, retrying: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:24 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:24.559302299+08:00" level=error msg="Upload failed, retrying: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:27 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:27.740905645+08:00" level=error msg="Upload failed, retrying: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:46 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:46.234680757+08:00" level=error msg="Upload failed: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:49 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:49.175747216+08:00" level=error msg="Upload failed: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:50 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:50.923496323+08:00" level=error msg="Upload failed: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:53 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:53.441843136+08:00" level=error msg="Upload failed: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:54 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:54.313424303+08:00" level=error msg="Upload failed, retrying: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:54 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:54.900419022+08:00" level=error msg="Upload failed: dial tcp 0.0.0.0:443: connect: connection refused"
Apr 05 18:02:54 lpt-linuxmint01 dockerd[1415]: time="2023-04-05T18:02:54.900505123+08:00" level=info msg="Attempting next endpoint for push after error: dial tcp 0.0.0.0:443: connect: connection refused"

Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

For those who will use this as reference, the issue end up being my laptop’s /etc/hosts file.

I removed the line for 0.0.0.0 tracking.digitalocean.com and the push to DCR was successful.

KFSys
Site Moderator
Site Moderator badge
April 6, 2023

Hey @sheenismhaellim,

I’ll first recommend checking the following Docs Page:

https://docs.digitalocean.com/products/container-registry/how-to/use-registry-docker-kubernetes/ and also

https://docs.digitalocean.com/products/container-registry/how-to/set-up-ci-cd/

and most importantly the ## Authenticate Using a Docker Configuration File part.

It does seem like a connection issue as well. Can you try opening the said port? I know you said your Firewall is disabled but it does seem like an issue with that

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel