Google Compute f1-micro 实例上的 Docker

dco*_*enb 3 google-compute-engine docker docker-machine

我正在尝试在谷歌计算引擎上部署一个新的 docker 机器,但我不需要太多的资源。只是一个简单的 nginx 服务器。

当我跑步时:

$ docker-machine create --driver google --google-project my-project-name my-machine-name
Run Code Online (Sandbox Code Playgroud)

它工作得很好,但创建了一个n1-standard-1 (1 个 vCPU,3.75 GB 内存)实例,但它的资源比我需要的多得多。我还能够成功创建一个g1-small (1 个 vCPU,1.7 GB 内存)实例。但是当我尝试创建最小的实例f1-micro (1 个 vCPU,0.6 GB 内存)时,它被卡住了Installing docker

我正在使用命令:

$ docker-machine create --driver google --google-project my-project-name --google-machine-type f1-micro my-machine-name
Run Code Online (Sandbox Code Playgroud)

控制台输出:

Running pre-create checks...
(my-machine-name) Check that the project exists
(my-machine-name) Check if the instance already exists
Creating machine...
(my-machine-name) Generating SSH Key
(my-machine-name) Creating host...
(my-machine-name) Opening firewall ports
(my-machine-name) Creating instance
(my-machine-name) Waiting for Instance
(my-machine-name) Uploading SSH Key
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with ubuntu(systemd)...
Installing Docker...
Run Code Online (Sandbox Code Playgroud)

docker 机器有最低要求吗?因为我看了又找不到。从我在文档示例中看到的内容应该是可能的:

$ gcloud auth login
$ docker-machine create --driver google --google-project PROJECT_ID vm01
$ docker-machine create --driver google \
  --google-project PROJECT_ID \
  --google-zone us-central1-a \
  --google-machine-type f1-micro \
  vm02
Run Code Online (Sandbox Code Playgroud)

我错过了什么吗?谢谢。

dco*_*enb 5

好吧,最终成功了,只是花了很长时间。

我的情况是15-20 分钟。(3台不同的机器)