harbor: docker 20.10 pull proxy cache image failed: Error response from daemon: missing or empty Content-Type header

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior:

should pull proxy cache repo images success.

but docker 20.10 pull proxy cache repo images got error missing or empty Content-Type header

Steps to reproduce the problem:

# docker.io is a proxy cache project
docker pull ${HARBOR_HOST}/docker.io/library/alpine:3.12
Error response from daemon: missing or empty Content-Type header

logs of docker desktop for mac

image

works well with docker 19.03.x normal project works well

Versions: Please specify the versions of following systems.

  • harbor version: v2.1.1-5f52168e
  • docker engine version: 20.10

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 22
  • Comments: 21 (5 by maintainers)

Commits related to this issue

Most upvoted comments

@morlay thanks for providing a fixed image.

But may I suggest to release this fix as soon as possible - maybe as a minor update for v2.1.2? Every new harbor-user is currently stumbling over it and may spend ages figuring out what is wrong before finding this issue here…

I installed 2.1.3-rc1 and can confirm that the problem no longer occurs.

Is there a workaround to this for now while the patch is created?

I hope that this is a sign of the imminent release of either 2.1.3 or 2.2.0 with the included bugfix? 😃

just downgrade docker to 18.x

for example, in debian

  • remove old version of docker
sudo apt-get remove docker docker-engine docker.io containerd runc
  • find suitable version
root@master1:/home/lihongjie/k8sdemo# apt-cache madison docker-ce
 docker-ce | 5:20.10.1~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:20.10.0~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.14~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.13~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.12~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.11~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.10~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.9~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.8~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.7~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.6~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.5~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.4~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.3~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.2~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.1~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:19.03.0~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.9~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.8~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.7~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.6~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.5~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.4~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.3~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.2~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.1~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 5:18.09.0~3-0~debian-buster | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 18.06.3~ce~3-0~debian | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 18.06.2~ce~3-0~debian | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 18.06.1~ce~3-0~debian | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 docker-ce | 18.06.0~ce~3-0~debian | https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/debian buster/stable amd64 Packages
 


  • install docker with version
apt install docker-ce=5:18.09.0~3-0~debian-buster

Thanks for the quick response, but this is not a closed issue if the fix is not released yet.

This issue may reproduced, if harbor proxied over cloudflare.

This is closed by github hook fix #issueid

I believe v2.1.3 will release soon https://github.com/goharbor/harbor/labels/target%2F2.1.3

Reproduced in Docker version 20.10.0, build 7287ab3