我正在尝试使用此命令部署此项目https://github.com/GoogleCloudPlatform/appengine-nodejs-quickstart
gcloud --project poised-graph-758 preview app deploy --server preview.appengine.google.com .
但是我收到了这个错误:
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
我尝试省略--server preview.appengine.google.com
参数但会导致相同的错误
答案 0 :(得分:6)
您需要提取google / docker-registry图像以解决此错误:
docker pull google/docker-registry
注意:如果在尝试重新部署时收到以下错误:
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")
确保已使用“不安全注册表”选项设置了docker守护程序(您需要在执行以下步骤后重新启动google / docker-registry )。您可以使用以下内容执行此操作(这是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
答案 1 :(得分:3)
首先尝试运行:
gcloud preview app setup-managed-vms
还要确保您正在运行Docker 1.3.0,而不是1.3.1。
Docker 1.4.0此刻也不起作用。
答案 2 :(得分:0)
使用--server preview.appengine.google.com
进行部署是为我做的。