# Config.yml help with Docker and Docker Compose

**URL:** <https://discuss.circleci.com/t/config-yml-help-with-docker-and-docker-compose/35244>\
**Category:** Build Environment\
**Created:** [April 2, 2020, 12:52pm UTC](https://discuss.circleci.com/t/config-yml-help-with-docker-and-docker-compose/35244 "2020-04-02T12:52:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nonoshan](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/nonoshan/32/24528_2.png) [@nonoshan](https://discuss.circleci.com/u/nonoshan)\
**Post date:** [April 2, 2020, 12:52pm UTC](https://discuss.circleci.com/t/config-yml-help-with-docker-and-docker-compose/35244/1 "2020-04-02T12:52:37Z")

</div>

I am migrating from BitBucket pipelines.

I use docker compose to run my integration tests. Before that I build a docker image to unit test with and run the unit tests against that image.

For now I am simply trying to do the following

1. Build my unit test image.
2. Run that image.

something like this  
command: |  
IMAGE\_TEST\_NAME=“motivsoft/github-taxi-dispatcher-unit”  
echo “Setting Image Name”  
echo $IMAGE\_TEST\_NAME  
docker build --target=unit-test -t $IMAGE\_TEST\_NAME .  
docker run $IMAGE\_TEST\_NAME

The problem is it doesn’t see Docker.  
I am using this image

docker:  
- image: docker/compose:1.25.3

This is because later I intend on using Docker Compose to run iTests

The error I am getting is

ERRO[0000] failed to dial gRPC: cannot connect to the Docker daemon. Is ‘docker daemon’ running on this host?: dial unix /var/run/docker.sock: connect: no such file or directory  
error during connect: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.40/build?buildargs=%7B%7D&cachefrom=%5B%5D&cgroupparent=&cpuperiod=0&cpuquota=0&cpusetcpus=&cpusetmems=&cpushares=0&dockerfile=Dockerfile&labels=%7B%7D&memory=0&memswap=0&networkmode=default&rm=1&session=0fzimcz4c36k9em1f82jkbfme&shmsize=0&t=motivsoft%2Fgithub-taxi-dispatcher-unit&target=unit-test&ulimits=null&version=1: context canceled

Exited with code exit status 1  
CircleCI received exit code 1

---

<div class="post-metadata">

**Author:** ![levlaz](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/levlaz/32/36978_2.png) [@levlaz](https://discuss.circleci.com/u/levlaz)\
**Post date:** [April 9, 2020, 4:58am UTC](https://discuss.circleci.com/t/config-yml-help-with-docker-and-docker-compose/35244/2 "2020-04-09T04:58:49Z")

</div>

Depending on your specific project requirements (such as needing to mount directories) I would suggest either using the remote docker environment or running docker-compose on a virtual machine.

You can learn more about this here: [https://circleci.com/docs/2.0/docker-compose/#using-docker-compose-with-docker-executor](https://circleci.com/docs/2.0/docker-compose/#using-docker-compose-with-docker-executor)
