docker-machine使用digitalocean驱动程序和Ubuntu 16.04 x64创build失败

我试图在数字海洋上创build一个docker机器,但用16.04 LTS而不是默认的15.10。 do-access-token文件包含我的令牌。

这是脚本(创build):

#!/usr/bin/env bash # Creates a digital-ocean server with Ubuntu 16.04 instead of the default if [ "$1" != "" ]; then echo "Creating: " $1 docker-machine \ create \ --driver digitalocean \ --digitalocean-access-token=`cat do-access-token` \ --digitalocean-image=ubuntu-16-04-x64 \ --digitalocean-ipv6=true \ $1 else echo "Must have server name!" fi 

当我像这样运行脚本:

 $ ./create-do ps-server 

它在数字海洋成功分配机器,然后用这个:

 Creating: ps-server Running pre-create checks... Creating machine... (ps-server) Creating SSH key... (ps-server) Creating Digital Ocean droplet... (ps-server) Waiting for IP address to be assigned to the Droplet... 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)... Error creating machine: Error running provisioning: Something went wrong running an SSH command! command : sudo apt-get update err : exit status 100 output : Reading package lists... E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ 

机器正在运行,但我无法得到它,因为SSH密钥显然没有设置之前,事情开始出错。

任何人以前看过这个和/或有解决办法?

更新:2016年5月21日今天早上再次打破同样的错误。 尝试了4次,每次都以相同的方式失败。

更新:2016年5月20日

这是数字海洋的支持,由于他们的Ubuntu 16.04图像,现在已经纠正的问题,我已经证实,这现在的作品。

相关的GitHub问题(尚未closures):

https://github.com/docker/machine/issues/3358

这对我工作:

 docker-machine provision your-node 

我从这里采取了这个解决scheme: https : //github.com/docker/machine/issues/3358

我希望这有帮助!