Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Docker Migration from Nexus – Feature Not Working



  • Hi ProGet team,

    I’m trying to use the Docker migration feature in ProGet to import images from a Sonatype Nexus repository, but it doesn’t seem to be working as expected with the following error.

    ERROR: Unhandled exception: System.Net.Http.HttpRequestException: Response status code does not indicate success: 404 (Not Found).
    

    The Nexus docker repository can be found in the selection of the import dialog.

    Before I proceed further, I’d like to confirm whether there are any specific requirements or limitations for this migration feature.

    In our setup:

    • The Nexus Docker repository is configured using a port connector.
    • We have a proxy server that maps this port to a different external URL.

    Would this configuration affect or break the migration process?
    If so, is there a recommended way to handle such setups?

    Any clarification or documentation on the expected configuration for Docker migration from Nexus would be greatly appreciated.

    Thanks.


  • inedo-engineer

    Hi @koksime-yap_5909,

    ProGet uses a combination of the Nexus REST API and the Docker API to pull images from Nexus. Just like packages, only local images will be pulled (as in only hosted Nexus Docker registries are supported). The basic process is:

    1. Get a list of images using the Nexus components API.
    2. Get the Docker API endpoint using the Nexus registries API (this is what you would use in the Docker client)
    3. Pull the image (manifest, layers, etc...) using the Nexus Docker API

    I'm guessing the error is occurring building the URL to Docker API endpoint. When you say that you are using an external proxy, did you configure the subdomain and port in Nexus to be the subdomain and port of your proxy? Would you also be able to send us the JSON that is returned for the following GET request in the Nexus API?

    https://«NEXUS_HOST_AND_PORT»/service/rest/v1/repositories/docker/hosted/«NEXUS_DOCKER_REGISTRY_NAME»
    

    If you can send me the value for the url property and the object for docker property, I can tell you what URL ProGet using to connect to the Docker API. Feel free to obfuscate the host name, subdomain (if configured), and registry name. The JSON will look something like this:

    {
      "name": "internal",
      "format": "docker",
      "type": "hosted",
      "url": "http://localhost:8081/repository/docker-example",
      
    ...
    
      "docker": {
        "v1Enabled": false,
        "forceBasicAuth": true,
        "httpPort": 8082,
        "httpsPort": 8083,
        "subdomain": "docker-a",
        "pathEnabled": true
      }
    }
    

    Thanks,
    Rich



  • Hi @rhessinger,

    Our Nexus docker repository is configured to use specific port (e.g. port 8080), but this port is not exposed externally. Here's an example response returned by the Nexus endpoint:

    {
      "name" : "example",
      "url" : "https://nexus-example/repository/example",
      "online" : true,
    ...
      "docker" : {
        "v1Enabled" : false,
        "forceBasicAuth" : true,
        "httpPort" : 8080,
        "httpsPort" : null,
        "subdomain" : null
      },
    ...
      "format" : "docker",
      "type" : "hosted"
    }
    

    Instead, we have a proxy server that maps a custom URL (e.g., https://nexus-docker/) to the internal Nexus port.

    All Docker operations (push/pull) work correctly through this custom URL.

    Could this proxy-based URL mapping affect the Docker migration feature, or is there a way to specify the external (proxy) URL for migration?

    Thanks.


  • inedo-engineer

    Hi @koksime-yap_5909,

    The separate proxy server port is what is causing the import issue with this. After looking at this further, the main issue is that specified httpPort is overriding the port, even when an https:// URL is being used. I created a ticket, PG-3155, to fix that and add the ability to override the URL used for the Docker API. This fix will be released in ProGet 2025.15. If you are interested, I can get you a pre-release build with the fix in it either later today or tomorrow. Just let me know!

    Thanks,
    Rich


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation