docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

The "Set a tag for a specified image id" is not working #935

Closed paturuv closed 9 years ago

paturuv commented 9 years ago

Hi -

I am trying to create a tag on the private docker registry, using the docker registry API, the call fails with 400 BAD REQUEST.

Could someone throw some light on this, if I am in dark..

Thanks

dmp42 commented 9 years ago

Can you copy the exact request you are doing, including all parameters and headers?

paturuv commented 9 years ago

It is a PUT request. http://registry-host:port/v1/repositories/namespace/repository:port/tags/v1.0

Thanks Venkat

Sent from my iPhone

On Feb 17, 2015, at 6:23 AM, Olivier Gambier notifications@github.com wrote:

Can you copy the exact request you are doing, including all parameters and headers?

— Reply to this email directly or view it on GitHub.

paturuv commented 9 years ago

It is a PUT request through spring rest template

http:///v1/repositories/<<namespace(Image Name)>>/<<repositoryname (docker-registry-hostname:port)>>/tags/<>/

Note:strings included within <<>> are specific values that I have provided

Please let me know if you see an issue

dmp42 commented 9 years ago

Please provide the exact arguments you used. Likely your repository name is not valid.

paturuv commented 9 years ago

It is a PUT request using spring rest template with 3 parameters Param:1 : ImageName (abc/pqr_base) Param:2: RepositoryName (docker-registry-host:port) Param-3: newTag

http:///v1/repositories/<>/<<repositoryName (registry-host:port)>>/tags/<>/

Please let me know if you see issue in the above format / parameters

dmp42 commented 9 years ago

Repository names are only allowed to contain: [a-z0-9-_.] And repository is not the same thing as registry.