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

How to run docker manifest when use docker-registry-ui? #250

Open
devome opened this issue Apr 30, 2022 · 2 comments
Open

How to run docker manifest when use docker-registry-ui? #250

devome opened this issue Apr 30, 2022 · 2 comments

Comments

@devome
Copy link

devome commented Apr 30, 2022

My registry config:

version: 0.1
log:
  fields:
    service: registry
storage:
  delete:
    enabled: true
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /var/lib/registry
http:
  addr: :5000
  headers:
    X-Content-Type-Options: [nosniff]
    Access-Control-Allow-Origin: ['*']

OS: Debian 11
Arch: amd64
Docker version: 20.10.14
Docker registry version: 2.8.1

When docker-registry-ui are not used

docker-compose file:

version: "3.7"
services:
  registry:
    image: registry:latest
    restart: always
    container_name: registry
    hostname: registry
    network_mode: bridge
    ports:
      - 5000:5000
    volumes:
      - ./config.yml:/etc/docker/registry/config.yml
      - ./registry:/var/lib/registry

When I run the following command, the output is valid.

docker manifest create --insecure "10.0.0.11:5000/image:latest" "10.0.0.11:5000/image:amd64 10.0.0.11:5000/image:arm64 10.0.0.11:5000/image:armv7"
docker manifest push --insecure --purge "10.0.0.11:5000/image:latest"

## output
Created manifest list 10.0.0.11:5000/image:latest
sha256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

When docker-registry-ui are used

docker-compose file:

version: "3.8"
services:
  registry:
    image: registry:latest
    restart: always
    container_name: registry
    hostname: registry
    volumes:
      - ./config.yml:/etc/docker/registry/config.yml
      - ./registry:/var/lib/registry
    networks:
      - registry-ui-net

  ui:
    image: joxit/docker-registry-ui:latest
    ports:
      - 5000:5000
    container_name: registry_ui
    hostname: registry_ui
    environment:
      - REGISTRY_TITLE=My Private Docker Registry
      - NGINX_PROXY_PASS_URL=http://registry:5000
      - NGINX_LISTEN_PORT=5000
      - SINGLE_REGISTRY=true
      - DELETE_IMAGES=true
      - SHOW_CONTENT_DIGEST=true
      - NGINX_PROXY_HEADER_X_Forwarded_For=$$proxy_add_x_forwarded_for
    depends_on:
      - registry
    networks:
      - registry-ui-net

networks:
  registry-ui-net:

When I run the following command, the output is error.

docker manifest create --insecure "10.0.0.11:5000/image:latest" "10.0.0.11:5000/image:amd64 10.0.0.11:5000/image:arm64 10.0.0.11:5000/image:armv7"
docker manifest push --insecure --purge "10.0.0.11:5000/image:latest"

## output
Created manifest list 10.0.0.11:5000/image:latest
failed to configure transport: unsupported registry version

Why does this error occur? How should I modify the configuration file?

@Joxit
Copy link
Owner

Joxit commented Sep 18, 2022

Hi there, thank you for using my project.

I think I will need your registry server and registry ui logs

@NoisyCoil
Copy link

NoisyCoil commented Jan 7, 2023

Hey there. I would like to confirm this issue and to point out that its probable cause is the lack of a header of the type

Docker-Distribution-Api-Version: registry/2.0

in the joxit/docker-registry-ui response headers. Some details can be found in the API docs. Adding the line

more_set_headers "Docker-Distribution-Api-Version: registry/2.0";

to my nginx configuration file (serving as a reverse proxy for joxit/docker-registry-ui) solved it, but perhaps it could be implemented more cleanly at the level of the container's nginx in nginx/default.conf following the API docs.

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

3 participants