stackinabox / stackinabox.io

stackinabox.io is a quick way to get up and running with IBM UrbanCode
http://stackinabox.io/
14 stars 6 forks source link

opdk.vm.provision :docker_compose step fails #8

Closed sputmayer closed 7 years ago

sputmayer commented 7 years ago

Hi Tim, I downloaded the latest code and tried to run vagrant up. However, for me the following step fails opdk.vm.provision :docker_compose. After a bit of debugging I realised that DOCKER_HOST environment variable was not being set when running as root. Following is the output.


/usr/local/bin/docker-compose-1.8.0 -f "/vagrant/compose/urbancode/docker-compose.yml" up -d --no-recreate --timeout 90

Stdout from the command:

Stderr from the command:

Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.


Strangely this variable was being setup as vagrant user, so If I sshd into box and ran the above command as vagrant user, it was successful. I changed your script to the following and it works now. opdk.vm.provision :docker_compose, env: { "DOCKER_HOST" => "192.168.27.100:2375" }, yml: "/vagrant/compose/urbancode/docker-compose.yml", command_options: { rm: "", up: "-d --no-recreate --timeout 90" }, project_name: "urbancode", compose_version: "1.8.0", run: "always"

sputmayer commented 7 years ago

Hi This error occured when I locally download the vbox file and tried to build the image off that. When running the ootb vagrant file, It all works fine. It can be closed