estesp / manifest-tool

Command line tool to create and query container image manifest list/indexes
Apache License 2.0
741 stars 92 forks source link

Nexus Docker Registry not support. #190

Closed MiRaIOMeZaSu closed 1 year ago

MiRaIOMeZaSu commented 1 year ago

I have nexus docker registry and it does support docker manifest-v2-2 as well as oci image index(which I have tried with buildx). But while I was going to push index with manifest-tool, it did't work. The YAML file is as follow:

image: hub.mynexusdomain.com/mirai0/mysql-multiarch:5.7
manifests:
  -
    image: hub.mynexusdomain.com/library/mysql-amd64:5.7
    platform:
      architecture: amd64
      os: linux
  -
    image: hub.mynexusdomain.com/library/mysql-arm64:5.7
    platform:
      architecture: arm64
      os: linux

and it failed withFATA[0000] Error pushing manifest list/index to registry: sha256:273426f6391efb54d55c809383f7403cecf8f6fec220299d9bbaf2edbc0f4437: manifest list/index references to blobs and/or manifests are missing in your target registry: failed commit on ref "index-hub.mynexusdomain.com/mirai0/mysql-multiarch:5.7@sha256:273426f6391efb54d55c809383f7403cecf8f6fec220299d9bbaf2edbc0f4437": unexpected status: 400 Bad Request I notice a prefix "index-" was add to my registry host, but hub.mynexusdomain.com is the only domain I expose for accepting request path start with /v2/. Then I try it with hub.docker.com and it works fine with below:

# mysql.yaml
image: mirai0/mysql-multiarch:5.7
manifests:
  -
    image: mirai0/mysql-amd64:5.7
    platform:
      architecture: amd64
      os: linux
  -
    image: dyanlaksma/mysql-arm64:latest
    platform:
      architecture: arm64
      os: linux

I thought the "index-" prefix was for hub.docker.com and then I try with ip+port, I add registry to docker Insecure Registries and change the YAML file to:

image: 192.168.1.49:30023/library/mysql-multiarch:5.7
manifests:
  -
    image: 192.168.1.49:30023/library/mysql-amd64:5.7
    platform:
      architecture: amd64
      os: linux
  -
    image: 192.168.1.49:30023/library/mysql-arm64:5.7
    platform:
      architecture: arm64
      os: linux

But manifest did't seem to use Insecure Registries config with following error output:

FATA[0000] Inspect of image "192.168.1.49:30023/library/mysql-amd64:5.7" failed with error: failed to do request: Head "https://192.168.1.49:30023            /v2/library/mysql-amd64/manifests/5.7": http: server gave HTTP response to HTTPS client

And I don't know what I could do to solve this, so please help.

MiRaIOMeZaSu commented 1 year ago

Neither manifest-tool nor docker mainfest worked well, and I tried podman manifest, everything solved.

djukic-marko commented 1 year ago

I have the same problem with Nexus. Has anyone been able to use this tool with the Nexus container registry?