How to upload docker image using API? - Sonatype Nexus Repository - Sonatype Community
How to upload docker image using API?
Version: Sonatype Nexus Repository Manager OSS 3.32.0-03
I use docker save -o a.tar nginx:v1 to save the image, and then upload it through the API interface with an error of 500.
Am I using it the wrong way?
Error as follows:
Post by dsawa on Aug 13, 2021
Hi catcat,
We’re sorry, but uploading Docker images via UI or REST is not supported.
You can upload Docker images to your hosted repository using regular Docker CLI as shown in the documentation: Pushing Images.
Post by meimei7154 on Dec 12, 2022
hi,
I am getting the same error as catcatlee when I attempted to upload an image tar file. I am using Nexus OSS 3.43.0-01, is it still not supported?
The documentation in the link below provides the docker.asset parameter for component API. Does that mean that it should be supported?
Post by dsawa on Dec 13, 2022
Hi Mei Mei,
The API you linked allows to upload individual assets meaning layers, manifests, and tags. An image tar file is not a single asset. If you want to use the API then you have to upload each individual layer, manifest, and tag separately. If you want to just upload the whole image then use a Docker client.