Pulling the image, prompts that the Content-Type header is missing
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 6.1k
- Forks
- 2.2k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 43
Description
Description
Execute
docker pull 172.17.163.100:5000/registry:2
Error response from daemon: missing or empty Content-Type header
I used curl -v http://172.17.163.100:5000/v2/registry/manifests/2 and found that the response header was missing.
[root@host1 (node) ~]$curl -v http://172.17.163.100:5000/v2/registry/manife
About to connect() to 172.17.163.100 port 5000 (#0)
Trying 172.17.163.100
Connected to 172.17.163.100 (172.17.163.100) port 5000 (#0)
GET /v2/registry/manifests/2 HTTP/1.1
User-Agent: curl/7.29.0
Host: 172.17.163.100:5000
Accept: */*
HTTP/1.1 200 ok
Server: Apache
Content-Length: 191
Cache-Control: no-cache
Connection: close
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"
><title>Forbidden</title>
</head>
<body>
A ※U·AIÊOa,öløyE-CeA*eføy "ÜÀÍUE!
</body>
</html>
Closing connection 0
I tried to use another server to pull and it worked.
[songfuyu@iZ8vb0xdcv9l0nxpz0tcv6Z ~]$ curl -v http://172.17.163.100:5000/v2/registry/manifests/2
About to connect() to 172.17.163.100 port 5000 (#0)
Trying 172.17.163.100.
Connected to 172.17.163.100 (172.17.163.100) port 5000 (#0)
GET /v2/registry/manifests/2 HTTP/1.1
User-Agent: curl/7.29.0
Host: 172.17.163.100:5000
Accept: */*
HTTP/1.1 200 OK
Content-Length: 6858
Content-Type: application/vnd.docker.distribution.manifest.v1+prettyjws
Docker-Content-Digest: sha256:5ce9ba3e373eddf7eba72760a59737cde30dcd7875df31146f4beec96791c2633
Docker-Distribution-Api-Version: registry/2.0
Etag: "sha256:5ce9ba3e373eddf7eba72760a5937cde30dcd78375df31146f4beec96791c2633"
X-Content-Type-Options: nosniff
Date: Fri, 26 Jul 2024 12:41:55 GMT
{
"schemaVersion": 1,
"name": "registry",
"tag"
"architecture": "amd64",
"fsLayers": [
"blobSum": "sha256:a3ed95caeb02ffe68cdd9fd844096680ae93d633cb16422d00e8a7c22955b46d4
"blobSum": "sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4"
"blobSum": "sha256:a37b1bf6a96f6fcb5ac2b9a981,a0648dbe58720ef98db756a79dbed55488d211"
.....
Reproduce
docker pull 172.17.163.100:5000/registry:2
Expected behavior
I hope the image 172.17.163.100:5000/registry:2 can be pulled down
docker version
Client: Docker Engine - Community
Version: 25.0.0
API version: 1.44
Go version: go1.21.6
Git commit: e758fe5
Built: Thu Jan 18 17:13:17 2024
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.0
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: 615dfdf
Built: Thu Jan 18 17:12:10 2024
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.33
GitCommit: d2d58213f83a351ca8f528a95fbd145f5654e957
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
docker info
Client: Docker Engine - Community
Version: 25.0.0
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.10.5
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.18.1
Path: /usr/libexec/docker/cli-plugins/docker-compose
Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 25.0.0
Storage Driver: overlay2
Backing Filesystem: xfs
Supports d_type: true
Using metacopy: false
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
Swarm: inactive
Runtimes: io.containerd.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d2d58213f83a351ca8f528a95fbd145f5654e957
runc version: v1.1.12-0-g51d5e94
init version: de40ad0
Security Options:
seccomp
Profile: builtin
Kernel Version: 3.10.0-1160.119.1.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.26GiB
Name: specialtest
ID: 193fda6b-fe84-4b7f-a67b-680e22c6b475
Docker Root Dir: /var/lib/docker
Debug Mode: false
Experimental: false
Insecure Registries:
172.17.163.100
::0
docker.mirrors.ustc.edu.cn
registry-1.docker.io
127.0.0.1
0.0.0.0
goproxy.cn
0.0.0.0/0
127.0.0.0/8
Registry Mirrors:
https://docker.mirrors.ustc.edu.cn/
https://hub-mirror.c.163.com/
https://registry.docker-cn.com/
Live Restore Enabled: false
Additional Info
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the docker pull command and comparing the two curl responses shown in the report. The issue names no Docker CLI file or test, so trace manifest-response handling only after confirming the response comes from Docker rather than the Apache endpoint. Done requires identifying a reproducible CLI defect and a focused regression test, or confirming an external registry/proxy cause.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, go
- Domain
- api, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100