moby: Docker 19.03 doesn't support OCI image
Description
Docker 17.09 and 18.06 are able to pull down OCI image, Docker 19.03 is not able to. When docker client sends /v2/<repo>/manifests/<tag> request,
- In docker 17.09, it doesn’t contain “application/vnd.oci.image.manifest.v1+json” in the request accept header, so it receives a docker v2 format manifest, which is supported natively by docker.
- In docker 18.06, it contains “application/vnd.oci.image.manifest.v1+json” in the request accept header, it receives an OCI format manifest, it looks like docker is able to handle it correctly. Docker client converts it into docker v2 format.
- In docker 19.03, it contains “application/vnd.oci.image.manifest.v1+json” in the request accept header, it receives an OCI format manifest, docker client is not able to handle it. So it gives this error message: Error response from daemon: mediaType in manifest should be ‘application/vnd.docker.distribution.manifest.v2+json’ not ‘’
Steps to reproduce the issue:
- Create a container registry in Azure, use podman build an OCI image and use podman to push it. In Azure portal,
- Docker client 17.09 and 18.06 are able to pull it down. Docker client 19.03 is not able to.
Describe the results you received: Docker client 19.03 gives the following error: Error response from daemon: mediaType in manifest should be ‘application/vnd.docker.distribution.manifest.v2+json’ not ‘’
Describe the results you expected: Docker pull should succeed.
Additional information you deem important (e.g. issue happens only occasionally):
Output of docker version
:
docker version
Client: Docker Engine - Community
Version: 19.03.1
API version: 1.40
Go version: go1.12.5
Git commit: 74b1e89
Built: Thu Jul 25 21:21:05 2019
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community Engine: Version: 19.03.1 API version: 1.40 (minimum version 1.12) Go version: go1.12.5 Git commit: 74b1e89 Built: Thu Jul 25 21:19:41 2019 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.2.6 GitCommit: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc: Version: 1.0.0-rc8 GitCommit: 425e105d5a03fabd737a126ad93d62a9eeede87f docker-init: Version: 0.18.0 GitCommit: fec3683
Output of docker info
:
Client: Debug Mode: false
Server: Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 2 Server Version: 19.03.1 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: false Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 894b81a4b802e4eb2a91d1ce216b8817763c29fb runc version: 425e105d5a03fabd737a126ad93d62a9eeede87f init version: fec3683 Security Options: apparmor seccomp Profile: default Kernel Version: 4.18.0-1024-azure Operating System: Ubuntu 18.04.2 LTS OSType: linux Architecture: x86_64 CPUs: 4 Total Memory: 15.64GiB Name: testpodmanyihchen ID: X3OI:UE7F:NMDF:WHSI:PRN2:UNPZ:Z24D:5CHF:5YMJ:2U2L:OSEF:U726 Docker Root Dir: /var/lib/docker Debug Mode: false Username: yc993 Registry: https://index.docker.io/v1/ Labels: Experimental: false Insecure Registries: 127.0.0.0/8 Live Restore Enabled: false
WARNING: No swap limit support
Additional environment details (AWS, VirtualBox, physical, etc.): Ubuntu 16.04 amd64
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 17 (10 by maintainers)
Commits related to this issue
- bump docker/docker to a30990b3c8d0d42280fa501287859e1d2393a951 full diff: https://github.com/docker/docker/compare/b6684a403c99aaf6be5b8ce0bef3c6650fcdcd12...a30990b3c8d0d42280fa501287859e1d2393a951 ... — committed to thaJeztah/cli by thaJeztah 5 years ago
- bump docker/docker to a09e6e323e55e1a9b21df9c2c555f5668df3ac9b full diff: https://github.com/docker/docker/compare/b6684a403c99aaf6be5b8ce0bef3c6650fcdcd12...a09e6e323e55e1a9b21df9c2c555f5668df3ac9b ... — committed to thaJeztah/cli by thaJeztah 5 years ago
- bump docker/docker to a09e6e323e55e1a9b21df9c2c555f5668df3ac9b full diff: https://github.com/docker/docker/compare/b6684a403c99aaf6be5b8ce0bef3c6650fcdcd12...a09e6e323e55e1a9b21df9c2c555f5668df3ac9b ... — committed to thaJeztah/cli by thaJeztah 5 years ago
- bump docker/docker to a09e6e323e55e1a9b21df9c2c555f5668df3ac9b full diff: https://github.com/docker/docker/compare/b6684a403c99aaf6be5b8ce0bef3c6650fcdcd12...a09e6e323e55e1a9b21df9c2c555f5668df3ac9b ... — committed to docker/docker-ce by thaJeztah 5 years ago
It looks like this regression has not yet been fixed in 19.03.2.
@Kubend I’m not sure why you are commenting on this issue. Your error is not the same at all. Most likely your issue is caused because you are using unified cgroup hierarchy (default in Fedora 31) which is not currently supported.
If you are using Fedora 31, you can use this and docker should work:
Fairly certain it’s related to this change: https://github.com/docker/distribution/commit/1d47ef7b801369dc2ca257732ea91d39089ecebc
Which breaks some code we have in moby which uses
DeserializedManifest
type to unmarshal an oci manifest.Looking into this.