我正在尝试创建一个数字海洋码头机器,但与16.04 LTS而不是默认的15.10。do-access-token文件包含我的令牌。
下面是脚本(create-do):
#!/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它在Digital Ocean上成功地分配了机器,然后在下面的代码中失败了:
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-05-21 02:23:45
更新:今天早上,2016年5月21日再次出现同样的错误。尝试了4次,每次都以同样的方式失败。
更新: 2016年5月20日
根据do Digital Ocean的支持,这是由于他们的Ubuntu 16.04图像的问题,现在已经更正,我已经确认这现在可以工作。
相关GitHub问题(尚未结束):
发布于 2016-05-19 11:55:33
这对我很有效:
docker-machine provision your-node我从这里采用了这个解决方案:https://github.com/docker/machine/issues/3358
我希望这能帮到你!
https://stackoverflow.com/questions/37283312
复制相似问题