Skip to content

Unable to push image #88

@joshiparth1000

Description

@joshiparth1000

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions