3

I'm trying to start a container using an image from Google Cloud Platform's Container Registry. But it returns this error message

Error: Status 405 trying to pull repository project/image: "v1 Registry API 
is disabled. If you are not explicitly using the v1 Registry API, it is 
possible your v2 image could not be found. Verify that your image is 
available, or retry with `dockerd --disable-legacy-registry`."

It also returns the same error when I run docker pull. I can push built images to the same registry without any problem, but can't pull for some reason.

I'm still new with Docker and docker-compose so I'm really not sure which part is wrong. These are my docker-compose file and Docker version:

version: '2'
services:
  web:
    image: 'asia.gcr.io/project/image:${tag}'

$ docker version
Client:
 Version:      17.03.1-ce
 API version:  1.27
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64

Server:
 Version:      17.03.1-ce
 API version:  1.27 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   c6d412e
 Built:        Mon Mar 27 17:10:36 2017
 OS/Arch:      linux/amd64
 Experimental: false

The tag exists in the registry

$ gcloud container images list-tags asia.gcr.io/project/image
DIGEST        TAGS      TIMESTAMP
8eb78a1ee2c8  0.3.84.1  2018-07-10T04:34:02
8e36423231ab  0.3.83.3  2018-06-26T09:17:45
004390b9b471  0.3.83.2  2018-06-26T08:05:37
4
  • Are you sure your tag exists? Try this to list all tags: gcloud container images list-tags asia.gcr.io/project/image Commented Jul 10, 2018 at 8:43
  • Can you post the output of "echo ${tag}" in the terminal where you're running the compose command? Commented Jul 10, 2018 at 8:51
  • @Javi i've updated my post. Yes the tag is there. was trying to pull '0.3.84.1' Commented Jul 10, 2018 at 9:39
  • @Neekoy it's working correctly. I have already tried replacing the '${tag}' part with the actual tag. still same error Commented Jul 10, 2018 at 9:40

1 Answer 1

2

I upgraded my Docker and docker-compose and now it works with no error. Not sure whats the actual cause of the problem as my other server still uses the above version and it works fine. Just want to leave this here for others who have this problem.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.