Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

glb + docker 20.10.2 errors #10

Open
matti opened this issue Jan 8, 2021 · 2 comments
Open

glb + docker 20.10.2 errors #10

matti opened this issue Jan 8, 2021 · 2 comments

Comments

@matti
Copy link
Contributor

matti commented Jan 8, 2021

invalid from flag value my-glb-host.name.com/libjpeg-turbo:2020-08-25-1: missing or empty Content-Length header

if I downgrade to 19.03 docker it works fine.

@tobias-kuendig
Copy link

It looks like Cloud Run removes the Content-Length header by default, which Docker 20.10 does no longer accept.

@tobias-kuendig
Copy link

tobias-kuendig commented Jan 26, 2021

By looking at the relevant Docker code, I did stumble upon these lines:
https://github.com/docker/distribution/blob/master/registry/client/repository.go#L333

It looks like Google Cloud Run strips the Content-Length header for HEAD requests, but not GET. By returning an error on HEAD requests, we force Docker to re-try using a GET request.

Definitely not a nice workaround, but it works for the time being:
OFFLINE-GmbH@6c98a08

Optimized implementation:
OFFLINE-GmbH/serverless-registry-proxy@445a0e2...OFFLINE-GmbH:932d954875fc798486ddfe5f4909f1f06761665b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants