2

我尝试将我的 vps 服务器与 dockercloud-agent 连接,但我无法让它运行。

我尝试了多个 Ubuntu-Server 版本(14.05、15.05 和 16.xx)安装了 docker,执行了 cloud.docker 脚本。

在启动时,我在 docker-cloud Dasboard 上“部署”,但它总是失败。这是日志输出:

Bringing your node to Docker Cloud...
Agent contacted! Checking whether docker has started in node...
Waiting for docker port to be open...
Docker port is open!
Waiting for docker server to be up...
[...]
Waiting for docker server to be up...
Instance has been removed from Docker Cloud
PLEASE NOTE: we have not shut down the underlying host as it was not created by Docker Cloud
ERROR: Unable to connect to the Docker daemon in 42xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.node.dockerapp.io. Please try to restart the Docker Cloud agent and contact support if the problem persists.

Reallocating containers in other nodes...
Reallocation done!

我已经打开了端口:

TCP 6783
UDP 6783
TCP 2375

我什至尝试在禁用防火墙的情况下运行它。

我发现了什么:

  • DockerAPI 不可访问(我通过本文使其可访问)
  • 在我执行了 dockercloud 脚本之后,它不再可以访问了
4

1 回答 1

1

好的,我让它在 Ubuntu Server 16.04 上运行

我首先启用了 docker rest API:

  • 1) 打开 lib/systemd/system/docker.service
  • 2) 将以 ExecStart 开头的行编辑为 ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375
  • 3)重载守护进程:systemctl daemon-reload
  • 4)重启docker服务:service docker restart
  • 5) 执行 dockercloud-agent 脚本。

现在它应该可以工作了。

于 2017-01-22T16:48:14.833 回答