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

Cant push to different Port - dial tcp IP:80: connect: connection refused #184

Closed
Ravisdo opened this issue May 2, 2021 · 1 comment
Closed

Comments

@Ravisdo
Copy link

Ravisdo commented May 2, 2021

Hi there, I'm using the latest image with basic auth. I read issue #88 and #113 but I'm a bit to silly to understand what's the problem now.

Also the registry and the ui is on a Docker Swarm environment with Portainer as management UI.
The Registry and UI is only allowed to spawn on the manager.

Bug description

When i push an image to an insecure registry with different Port 80 it tries to push to port 80 instead

How to Reproduce

Use latest image tags. Set insecure registry in Docker config. Build an image and push to registry

For service bug, steps to reproduce the behavior:

My docker-compose file

version: '3.0'
services:
  registry:
    image: registry:2.7
    volumes:
      - /home/manager/registry/data:/var/lib/registry
      - /home/manager/registry/config/credentials.yml:/etc/docker/registry/config.yml
      - /home/manager/registry/config/htpasswd:/etc/docker/registry/htpasswd
    deploy:
      mode: global
      placement:
        constraints: [node.role == manager]
  ui:
    image: joxit/docker-registry-ui:latest
    ports:
      - 5080:80
    environment:
      - REGISTRY_TITLE=Docker Registry
      - NGINX_PROXY_PASS_URL=http://registry:5000
      - SINGLE_REGISTRY=true
      - REGISTRY_URL=http://registry.my.domain.com:5080
    depends_on:
      - registry
    deploy:
      mode: global
      placement:
        constraints: [node.role == manager]

My private docker registry configuration

ersion: 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: ['http://registry.my.domain.com:5080']
    Access-Control-Allow-Methods: ['HEAD', 'GET', 'OPTIONS', 'DELETE']
    Access-Control-Allow-Headers: ['Accept', 'Authorization']
    Access-Control-Max-Age: [1728000]
    Access-Control-Allow-Credentials: [true]
    Access-Control-Expose-Headers: ['Docker-Content-Digest']
auth:
  htpasswd:
    realm: basic-realm
    path: /etc/docker/registry/htpasswd
health:
  storagedriver:
    enabled: true
    interval: 10s

My credientals configuration

api:$2y$12$C6BSDYA1kgvh2kd.1N84CuPU8jqDGdzrMorVuuHPqcFO/xc0RxyI.

Expected behavior

When I login to registry and push an image, it should pushed to correct port.

Messages

docker push registry.my.domain.com:5080/webserver:latest
The push refers to repository [my.domain.com:5080/webserver]
5f70bf18a086: Pushing 1.024kB
b1af94ce966b: Retrying in 6 seconds
81a4cb3f68a6: Pushing [==================================================>] 4.608kB
e603a75907a9: Pushing [==================================================>] 6.144kB
8b016890b75e: Pushing [==================================================>] 4.608kB
968a8603b9aa: Waiting
592ae146a01c: Waiting
4539491a6d4d: Waiting
7a54243e5443: Waiting
dcb9f737fe15: Waiting
de4aa1659df8: Waiting
75642f4b5133: Waiting
561d94cdc4d7: Waiting
b2d5eeeaba3a: Waiting
dial tcp IP.OF.REGISTRY:80: connect: connection refused

System information

  • OS: Windows 10
  • Docker registry UI:
    • Version: latest
    • Server: Debian 10
    • Docker version: 20.10.6, build 370c289
    • Docker registry ui tag: latest
    • OS/Arch: linux/amd64
    • Tools: docker swarm, portainer

Additional context

UI is reachable, login works on cli, /v2/ is reachable and returns {}

@Ravisdo
Copy link
Author

Ravisdo commented May 2, 2021

Okay, nevermind.
With https it works fine under a different port :D

@Ravisdo Ravisdo closed this as completed May 2, 2021
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

1 participant