Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gcloud deploy error: Image with tag google/docker-registry was not found

I'm trying to deploy this project https://github.com/GoogleCloudPlatform/appengine-nodejs-quickstart by using this command

gcloud --project poised-graph-758 preview app deploy --server preview.appengine.google.com .

but i get this error:

Updating module [default] from file [/Users/kannix/Desktop/tmp/appengine-nodejs-quickstart/app.yaml]
11:36 PM Host: preview.appengine.google.com
{bucket: vm-containers.poised-graph-758.appspot.com, path: /containers}

Traceback (most recent call last):
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 153, in <module>
    main()
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/gcloud/gcloud.py", line 149, in main
    _cli.Execute()
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/calliope/cli.py", line 381, in Execute
    post_run_hooks=self.__post_run_hooks, kwargs=kwargs)
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/calliope/frontend.py", line 274, in _Execute
    pre_run_hooks=pre_run_hooks, post_run_hooks=post_run_hooks)
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/calliope/backend.py", line 887, in Run
    result = command_instance.Run(args)
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/calliope/exceptions.py", line 78, in TryFunc
    return func(*args, **kwargs)
  File "/Users/kannix/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 154, in Run
    self.__Run(args, project, deployables)
  File "/Users/kannix/google-cloud-sdk/lib/googlecloudsdk/appengine/app_commands/deploy.py", line 207, in __Run
    info.runtime, path, bucket)
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/push.py", line 134, in BuildAndPushDockerImage
    boto_path=config.BOTO_PATH)) as r:
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/registry.py", line 148, in __enter__
    self.Start()
  File "/Users/kannix/google-cloud-sdk/./lib/googlecloudsdk/appengine/lib/images/registry.py", line 97, in Start
    self._registry.Start()
  File "/Users/kannix/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 480, in Start
    self._image.Build()
  File "/Users/kannix/google-cloud-sdk/platform/google_appengine/google/appengine/tools/docker/containers.py", line 309, in Build
    raise ImageError('Image with tag %s was not found' % self.tag)
google.appengine.tools.docker.containers.ImageError: Image with tag google/docker-registry was not found

I tried to omit the --server preview.appengine.google.com parameter but it results in the same error

like image 354
kannix Avatar asked Jan 10 '23 11:01

kannix


1 Answers

You need to pull the google/docker-registry image to resolve this error:

docker pull google/docker-registry

Note: if you receive the following error when trying to redeploy:

docker.docker.errors.APIError: 500 Server Error: Internal Server Error ("Invalid registry endpoint https://192.168.59.103:49153/v1/: Get https://192.168.59.103:49153/v1/_ping: EOF. If this private registry supports only HTTP or HTTPS with an unknown CA certificate, please add `--insecure-registry 192.168.59.103:49153` to the daemon's arguments. In the case of HTTPS, if you have access to the registry's CA certificate, no need for the flag; simply place the CA certificate at /etc/docker/certs.d/192.168.59.103:49153/ca.crt")

Ensure that your docker daemon has been setup with the 'insecure registry' option (you will need to re-pull the google/docker-registry after the following steps) . You can do this with the following, (which was an answer on https://github.com/docker/docker/issues/8887):

$ boot2docker delete #removes old image
$ rm -f ~/.ssh/id_boot2docker* # remove old keys
$ boot2docker init #generates new keys, cert
$ boot2docker up
$ boot2docker ssh
$ # add EXTRA_ARGS="--insecure-registry <YOUR INSECURE HOST>" 
$ # to /var/lib/boot2docker/profile
$ sudo /etc/init.d/docker restart
like image 145
yusufm Avatar answered Apr 21 '23 15:04

yusufm