I am facing issues when I try to push to registry that I created earlier. Here are the steps that I followed.
docker run -d -p 5001:5002 --restart=always --name new_registry registry:2
docker build -t test-app .
docker run -p 50100:8080 -d --name app test-app
docker tag test-app localhost:5001/test:latest
docker push localhost:5001/test:latest
=================================================
✘ ~/G/S/d/a/App master docker push localhost:5001/test:latest
The push refers to a repository [localhost:5001/test] (len: 1)
Sending image list
Put http://localhost:5001/v1/repositories/test/: net/http: transport closed before response was received
Below is output of docker images command:
~/G/S/d/a/App master docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
test-app latest 78f9362f7cd5 51 minutes ago 547.8 MB
localhost:5001/test latest 78f9362f7cd5 51 minutes ago 547.8 MB
registry 2 5d165b8e4b20 3 weeks ago 220.1 MB
More Details Below:
~/G/S/d/a/patterns_and_tools docker-machine env default
set -x DOCKER_TLS_VERIFY "1";
set -x DOCKER_HOST "tcp://192.168.yyy.xxx:2376";
set -x DOCKER_CERT_PATH "/Users/zack/.docker/machine/machines/default";
set -x DOCKER_MACHINE_NAME "default";
# Run this command to configure your shell:
# eval (docker-machine env default)
~/G/S/d/a/patterns_and_tools
I checked the network settings in the VM . They are as below:
Name : dockersetting protocol : TCP HOST IP: HOST PORT : 50100 GuestIP : Guest Port : 50100