docker-registry icon indicating copy to clipboard operation
docker-registry copied to clipboard

Add support for HTTP redirection for push and pull

Open proppy opened this issue 11 years ago • 7 comments

So that storage driver can decide to redirect to vendor upload and serving static URLs instead of serving the content dynamically.

proppy avatar Dec 04 '13 01:12 proppy

:+1:

Apparently Docker follows the redirections, so it'll work out of the box if the Registry serves 302 for pulling the layers.

I'd make this optional in the config though since it's related to the storage backend being used.

samalba avatar Dec 05 '13 18:12 samalba

Fantastic, I was about to ask this as well. Thank you!

ghost avatar Jan 09 '14 11:01 ghost

Hello, Is this already available in the current release?

ghost avatar Jan 19 '14 21:01 ghost

No, it's something that has been only discussed so far. But we accept pull requests :-)

samalba avatar Jan 21 '14 18:01 samalba

This feature is important to me, and should be important to you, too!

I want to run the registry on a puny machine so I don't have to pay much for that machine.

Currently, I host my images on S3. If I run the registry on a puny machine and launch several machines who simultaneously pull, I get a thundering herd which kills the puny machine. If the puny machine just did a HTTP 302 redirect to a pre-signed S3 URL, then it wouldn't have to have any data flowing through it except for the HTTP request. S3 can handle pushing the bytes to the server in a distributed manner, as S3 is good at.

pwaller avatar Feb 08 '15 12:02 pwaller

I can't see any way of pulling this off with the current StorageDriver interface. Is there any space to fit in the required interfaces for a HTTP-redirecting storage driver in docker-registry-ng?

pwaller avatar Feb 08 '15 12:02 pwaller

@samalba Is this available now? I still can't get redirection yet.

zmmwl avatar Dec 20 '17 03:12 zmmwl