Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to push image #88

Closed
joshiparth1000 opened this issue Jun 18, 2019 · 5 comments
Closed

Unable to push image #88

joshiparth1000 opened this issue Jun 18, 2019 · 5 comments

Comments

@joshiparth1000
Copy link

joshiparth1000 commented Jun 18, 2019

Hi,

I have setup the registry-ui and registry itself using the below docker-compose.yml file:

version: '2'

services:
  registry-srv:
    image: registry:latest
    restart: always
    #ports:
    #  - 5000:5000
    volumes:
      - storage:/var/lib/registry
      - ./registry/config.yml:/etc/docker/registry/config.yml:ro
    networks:
      - registry-ui-net
    container_name: registry-srv
  registry-ui:
    image: joxit/docker-registry-ui:static
    restart: always
    ports:
      - 8080:80
    environment:
      - REGISTRY_TITLE=Private Docker Registry
      - REGISTRY_URL=http://registry-srv:5000
      - DELETE_IMAGES=true
    depends_on:
      - registry-srv
    networks:
      - registry-ui-net
    container_name: registry-ui

networks:
    registry-ui-net:

volumes:
    storage:
      driver: local

my registry config.yml is as below:

version: 0.1
log:
  fields:
    service: registry
storage:
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /var/lib/registry
  delete:
    enabled: true
http:
  addr: :5000
  headers:
    X-Content-Type-Options: [nosniff]
    Access-Control-Allow-Origin: ['*']
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    Access-Control-Expose-Headers: ['Docker-Content-Digest']
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3

The registry-ui is configured as a reverse proxy for the registry container. I can see that it is working correctly:

curl http://localhost:8080/v2/_catalog
{"repositories":[]}

The registry-ui also has been added as in insecure registry in the docker config.

cat /etc/docker/daemon.json
{
        "insecure-registries" : ["127.0.0.1:8080"]
}

But even after doing this I am unable to push images to this local registry. I get retrying message when pushing images:

docker image ls
REPOSITORY                 TAG                 IMAGE ID            CREATED             SIZE
joxit/docker-registry-ui   static              e247d643a5da        11 days ago         21.3MB
127.0.0.1:8080/registry    latest              f32a97de94e1        3 months ago        25.8MB
registry                   latest              f32a97de94e1        3 months ago        25.8MB

 docker push 127.0.0.1:8080/registry
The push refers to repository [127.0.0.1:8080/registry]
73d61bf022fd: Pushing [==================================================>]     155B/155B
5bbc5831d696: Pushing [==================================================>]  3.584kB
d5974ddb5a45: Retrying in 1 second
f641ef7a37ad: Retrying in 1 second
d9ff549177a9: Retrying in 1 second
dial tcp 127.0.0.1:80: connect: connection refused

Could you please help out and let me know what I am doing wrong here?

@Joxit
Copy link
Owner

Joxit commented Jun 20, 2019

Hi,

That's really weird, I tried you configuration and when I change the port to 80 instead of 8080 it works... Can you try the port 80 and tell me if it works?

@joshiparth1000
Copy link
Author

Hi,

Yes after changing the port to 80 it does work.

@Joxit
Copy link
Owner

Joxit commented Jun 20, 2019

Okay
I'll try to find why this doesn't work with 8080 port, this may be linked to the protocol between the docker client and the registry.

I see this message dial tcp 127.0.0.1:80: connect: connection refused when the contact point is 127.0.0.1:8080. Maybe this is a registry misconfiguration.

Can I close the issue or you would like to have your ui on 8080 port?

@joshiparth1000
Copy link
Author

joshiparth1000 commented Jun 20, 2019 via email

@Joxit Joxit closed this as completed in 1321d9b Jun 22, 2019
@Joxit
Copy link
Owner

Joxit commented Jun 22, 2019

Hi
Good news, I fixed this issue ! I also add an example here.

This should works for you now.

Thank you again for your issue ! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants