Run docker-compose not working


#1

Hi! On my local environment for laravel I only need this docker-compose.yml file to run my application, phpunit tests, and browser tests too: https://gist.github.com/ibrunotome/dbe760f246cef14159014e99fc03a8f6.

I’m trying to execute it on buddy, so i taked the “Local Shell” action, and made this setup:

On Environment Customization:

apt-get update -y && apt-get upgrade -y
apt-get install curl -y
curl -fsSL get.docker.com | sh
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

And on Run Commands:

cd /buddy/the-job
docker-compose up -d
docker-compose run app vendor/bin/phpunit
docker-compose run app php artisan dusk

And i got the message:

docker-compose up -d
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.

How I can resolve that? I really want to execute by docker-compose way. Is there other way to run docker-compose.yml files here?

Thanks!

[EDIT]

I also see that docker is not running the daemon, and I did not solve that at this moment.

docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.

#2

Hi Bruno,
Unfortunately, this is not possible since the Local Shell action is run in a Docker container. In order to run subsequent containers (Docker-in-Docker) you need the --priviliged flag which we cannot add due to security reasons.

We are going to add docker compose in one of the sprints to come. It’s too early for any ETA, though.


#3

Thanks Alexander.


#4

Any update yet?


#5

No updates yet, we’ll let you know when the works commence (it won’t happen quickly though).


#6

+1
Interested as well by the ability to run docker in docker ! Specially to deploy code to docker swarm