Docker Community Forums

Share and learn in the Docker community.

Pushing image in private docker registry fails due to timeout


I have create a registry container in one of my VM
docker run -d -p 5000:5000 --restart=always --name test-2 registry:2

I have added the host ip and 5000 port in /etc/docker/daemon.json followed by docker service restart.
“insecure-registries” : [“IP:port”]

I downloaded a alpine image from docker hub, tagged it and tried to push it, but i got timeout error.

docker pull alpine;
docker tag alpine <host_ip>:5000/v2/myalpine
docker push <host_ip>:5000/v2/myalpine
fbe240dd8a98: Pushing [==================================================>] 5.15MB/5.15MB
954693ea7581: Waiting
received unexpected HTTP status: 504 Connection Timed Out

Docker version

[root@ojrkedev02 yum.repos.d]# docker version
Client: Docker Engine - Community
Version: 19.03.8
API version: 1.39 (downgraded from 1.40)
Go version: go1.12.17
Git commit: afacb8b
Built: Wed Mar 11 01:27:04 2020
OS/Arch: linux/amd64
Experimental: false

Server: Docker Engine - Community
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 03:47:25 2019
OS/Arch: linux/amd64
Experimental: false

All the activities are happening on same host having internet connection and firewall disabled. Any idea how to resolve this time out issue ?