2014-11-25 60 views
8

我试图在我的机器上运行Dart应用,最终部署在Google App Engine上。我已经按照此页面如何在不使用boot2docker的情况下使用gcloud预览应用程序?

https://www.dartlang.org/cloud/

上找到的指令是,我已经有一个本地的码头工人守护进程,我想这使用,真的不希望使用VirtualBox虚拟的区别。这些说明假定您使用的是boot2docker,它坚持使用VirtualBox安装VirtualBox VM并在此上运行docker守护进程。每次我试图从我读过运行

gcloud preview app run app.yaml 

我得到

google.appengine.tools.docker.containers.DockerDaemonConnectionError: 
Couldn't connect to the docker daemon because the required environment 
variables were not set. Please check the environment variables 
DOCKER_HOST, DOCKER_CERT_PATH and DOCKER_TLS_VERIFY are set correctly. 
If you are using boot2docker, make sure you have run "$(boot2docker shellinit) 

我感觉,你不必使用boot2docker,并使用当地码头工人守护进程实例。问题是我找不到有关如何执行此操作的任何说明。我希望有人能为我回答这个问题。此外,我给出的错误消息并不能帮助我,因为任何Google搜索都会给我使用相同的答案boot2docker。

+0

冈特你能提供一个链接到这个重复的问题吗? – 2014-11-25 09:09:12

+0

我看到你已经做到了,谢谢 – 2014-11-25 09:13:08

+0

我看不到关于链接问题的答案。没有任何迹象表明哪个答案是正确的这种情况 – regretoverflow 2014-12-05 02:24:57

回答

3

我装码头工人从1.3.2 unstable(Debian的),加

DOCKER_OPTS="-d -H unix:///var/run/docker.sock -H tcp://localhost:2375" 

/etc/default/docker,并设置

DOCKER_HOST=tcp://localhost:2375 

,使其工作。

此页面http://docs.docker.com/articles/https/包含有关如何为Docker配置HTTPS的更多信息。

我创建了一个问题https://github.com/dart-lang/www.dartlang.org/issues/1162来更新Dart的设置说明。

+0

虽然我通过systemd运行docker,但是这几乎可以回答我的问题,即使答案也在另一个重复问题中找到 – 2014-11-26 01:04:19

+0

我刚刚发现此问题,因为我面临同样的问题,并通过添加上述2行来编辑上述文件,但仍然出现此错误: '无法使用指定的' google.appengine.tools.docker.containers连接到docker守护进程.DockerDaemonConnectionError:无法使用指定的环境变量连接到docker守护程序。请检查环境变量DOCKER_HOST,DOCKER_CERT_PATH和DOCKER_TLS_VERIFY是否设置正确。如果您使用的是boot2docker,请确保您已经运行“$(boot2docker shellinit)” – 2015-02-19 10:18:02

+0

更改后重新启动Docker'sudo /etc/init.d/docker restart'并检查echo $ DOCKER_HOST'是否设置了变量活跃。 – 2015-02-19 10:39:46

相关问题