Config.yml help with Docker and Docker Compose

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: |
echo “Setting Image 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

- 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

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: