谷歌计算引擎f1-micro实例上的Docker

3

我想在谷歌云上部署一台新的Docker机器,但是我不需要太多的资源,只需要一个简单的Nginx服务器。

当我运行以下命令时:

$ docker-machine create --driver google --google-project my-project-name my-machine-name

它的表现很好,但创建了一个"n1-standard-1" (1个vCPU,3.75GB内存) 的实例, 拥有比我需要的更多的资源。我也成功地创建了一个"g1-small"(1个vCPU,1.7GB内存)的实例。但是当我尝试创建最小的"f1-micro"(1个vCPU,0.6GB内存)时,它卡在"安装docker"上。 我使用的命令如下:
$ docker-machine create --driver google --google-project my-project-name --google-machine-type f1-micro my-machine-name

控制台输出:

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...

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

我有遗漏吗? 谢谢。

1个回答

5

好的,最终它能够正常工作,只是花费了非常长的时间

在我的情况下大约需要15-20分钟。(3台不同的机器)


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接