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

Proxy-Cache for official images isn't working #13733

Closed
fandujar opened this issue Dec 10, 2020 · 7 comments
Closed

Proxy-Cache for official images isn't working #13733

fandujar opened this issue Dec 10, 2020 · 7 comments

Comments

@fandujar
Copy link

Expected behavior and actual behavior:
Commands like docker pull myharbor.mycompany.com/myproxycache/alpine:latest would result in image pulled

Steps to reproduce the problem:

  • Create a project with proxy-cache enabled linked to dockerhub endpoint (i used dockerhub as my project name)
  • Use docker client to pull a official image like alpine or nginx

Versions:
Please specify the versions of following systems.

  • harbor version: [2.1.1]
  • docker engine version: [19.03.13 (Community)]

Result from docker pull command:

docker pull myharbor.mycompany.com/dockerhub/alpine:latest Error response from daemon: unknown: repository dockerhub/alpine not found

@EdKingscote
Copy link

Have you tried docker pull myharbor.mycompany.com/dockerhub/library/alpine:latest there is a footnote at the bottom of the docs at https://goharbor.io/docs/2.1.0/administration/configure-proxy-cache/#how-harbor-proxy-cache-works about single level repositories and official images.

@alfsch
Copy link

alfsch commented Dec 11, 2020

I have the same errors with exact the same harbor setup. When I use

docker pull myharbor.mycompany.comdockerhub/library/alpine:latest

I get a different error
Error response from daemon: missing or empty Content-Type header

When I use the command like in the bug description I get the same error as in issue description. The used docker version is:

Docker version 20.10.0, build 7287ab3

@fabianotessarolo
Copy link

fabianotessarolo commented Dec 11, 2020

Yeah, indeed, that worked here @EdKingscote @fandujar.

A related issue here, but for Transparent proxy is:
Problem: #8082
Feature Request: #13579

Seems like NGINX rewrite suggestion for Transparent Proxy, should take into consideration this.

@fandujar
Copy link
Author

@EdKingscote I tried, but got same error @alfsch

Error response from daemon: missing or empty Content-Type header

@alfsch
Copy link

alfsch commented Dec 11, 2020

@fandujar and @EdKingscote: the problem is docker 20.10 see #13740

@EdKingscote
Copy link

I ran in to the Content-Type header problem last night as well, but only on machines that all just happened to be internal, so I figured it was a quirk of HAProxy being our front-end before I had to call it a night. Thanks @alfsch for sharing the link to that new issue, as it turns out purely by chance all of our external hosts are using older docker engines than our internal ones - that saved me a good chunk of investigation time this morning! Hopefully it won't take too long for a fix to materialize somewhere.

@fandujar
Copy link
Author

Tks for sharing and for the help @EdKingscote @alfsch . I will close this one then.

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

4 participants