你好,
我正在尝试使用以下命令在 Google Cloud 上创建机器:
docker-machine create --driver google --google-machine-image ubuntu-1404-trusty-v20161130 --google-project <project> --google-disk-size 30 --google-machine-type n1-standard-2 google-machine
并出现以下错误;
创建机器时出错:机器创建期间驱动程序出错:googleapi:错误 400:字段“resource.disks[0].initializeParams.sourceImage”的值无效:“ubuntu-1404-trusty-v20161130”。
我可以使用以下命令在谷歌云图像列表中看到图像:
gcloud compute images list
提前致谢
抱歉,我需要提供绝对网址https://www.googleapis.com/compute/v1/projects/ubuntu-os-cloud/global/images/family/ubuntu-1404-lts而不是 ubuntu-1404-trusty-v20161130 .
哇,感谢您发布后续评论。 我在任何地方都找不到 URL 前缀。 你到底是怎么谷歌这个的?
我也遇到过这种情况。 为了记录,运行gcloud compute images list --uri
获取可用图像的绝对 URI。
只需ubuntu-os-cloud/global/images/ubuntu-1404-trusty-v20161130
对我有用
无需添加所有 URL
最有用的评论
我也遇到过这种情况。 为了记录,运行
gcloud compute images list --uri
获取可用图像的绝对 URI。