Reputation: 313
I do this:
docker pull my-private-repo.xyz.com:443/platform/abc
I get following error:
Pulling repository my-private-repo.xyz.com:443/platform/abc
Error: Status 400 trying to pull repository platform/abc: "{\n \"errors\" : [ {\n \"status\" : 400,\n \"message\" : \"Unsupported docker v1 repository request for 'my-private-repo'\"\n } ]\n}"
My docker daemon is configured as this:
{
"insecure-registries" : [
"my-private-repo.xyz.com:443"
],
"experimental" : false
}
Here is my docker info:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 15
Server Version: 1.13.0
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 22
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 03e5862ec0d8d3b3f750e19fca3ee367e13c090e
runc version: 2f7393a47307a16f8cee44a37b262e8b81021e3e
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.9.4-moby
Operating System: Alpine Linux v3.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.952 GiB
Name: moby
ID: WW55:6DVS:DJCJ:3NXI:2CDX:44JW:F6IK:P2JU:LM7X:B76Y:HC3G:RCEU
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 16
Goroutines: 27
System Time: 2017-01-24T21:30:22.279581628Z
EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
my-private-repo.xyz.com:443
127.0.0.0/8
Live Restore Enabled: false
Added the docker info above. Any solutions? pointers on what I could be doing wrong?
docker client version is this:
13:39 $ docker --version
Docker version 1.13.0, build 49bf474
UPDATE:
Resolved. Looks like Docker is throwing ambiguous error message when the image does not exist in the repository. When I was doing this:
docker pull my-private-repo.xyz.com:443/platform/abc
I was expecting to pull the image with 'latest' tag to be downloaded. In the repository no such image exist with this tag. But the error thrown was wrong.
In addition I also changed my daemon configuration as suggested in the comments to this:
{
"experimental" : false,
"disable-legacy-registry" : true,
"insecure-registries" : [
"my-private-repo.xyz.com:443"
]
}
And now I am able to pull the image.
Upvotes: 11
Views: 22610
Reputation: 3201
If you are getting this means that you are using Docker less that version 1.9. Docker has deprecated the v1 registries from this version. Please check these following things
docker --version
and docker info
docker run --rm --pid=host alpine ps aux | grep dockerd
The above command will show you how many Docker registries are configured in your system. if there are multiple, please check by removing and configuring one by one.
so if it has more than one registry setup please check each registry and check the configuration if its supports v2 or not.
if you have configured only one registry and facing this issue, I would recommend upgrading the version of Docker greater than 1.9.
Upvotes: 0
Reputation: 2842
When you are pulling an image from registry with Docker client, the client will try to send a V2 version request to registry firstly. If this request returned with error (i.e. image not existing or the request is unauthorized), then docker client will fall back and try to send another V1 version request.
Since your registry is on a newer version, and it does not support V1 APIs anymore, the registry will throw error such as 'Unsupported docker v1 repository request' in the second V1 request attempting.
To avoid this, Docker developer is planning to add the --disable-legacy-registry
option to Docker client by default. If this option has been set as true, Docker client will not try to send V1 version request again but will return the original error message from initial V2 request.
For more info, please check this issue: https://github.com/docker/docker/issues/26142#issuecomment-271867508
Upvotes: 10