Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use gcloud preview app run without boot2docker? [duplicate]

I'm trying to run a Dart app on my machine, to be eventually deployed on Google App Engine. I've followed the instructions found on this page

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

The difference is I already have a local docker daemon running, which I'd like to use, and don't really want to use VirtualBox. The instructions assume you are using boot2docker, which insists on using VirtualBox to install an VirtualBox VM and run the docker daemon on this. Everytime I try and run

gcloud preview app run app.yaml

I get

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)

I sense from what I've read, that you don't have to use boot2docker, and use a local docker daemon instance. The problem is I can't find any instructions on how to do this. I am hoping someone can answer this for me. Also the error message I am given doesn't help me, as any google search I do keeps giving me the same answer of use, boot2docker.

like image 896
James Hurford Avatar asked Nov 25 '14 02:11

James Hurford


1 Answers

I installed Docker 1.3.2 from unstable (Debian), added

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

to /etc/default/docker, and set

DOCKER_HOST=tcp://localhost:2375

to make it work.

This page http://docs.docker.com/articles/https/ contains more information about how to configure docker for HTTPS.

I created an issue https://github.com/dart-lang/www.dartlang.org/issues/1162 to update the setup instructions for Dart.

like image 155
Günter Zöchbauer Avatar answered Sep 20 '22 07:09

Günter Zöchbauer