Couldn't connect to Docker daemon at https

Hi there,

I know this question was asked at least a couple of times in the past, but none of the answers I saw really fitted my problem.

As the subject says, I get the Couldn’t connect to Docker daemon message when invoking docker-compose command. I have the following executor and config:

            -   image: circleci/php:7.4-node-browsers
            -   image: circleci/postgres:12-postgis-ram
                    POSTGRES_PASSWORD: ci

And then I use that executor:

    executor: docker-publisher

        - checkout
        - setup_remote_docker
        -   run:
                name: Running docker-compose build
                command: docker-compose -f .docker/docker-compose.yml -f .docker/ --env-file .docker/.env build

And then, when running, I get:

Setup remote docker engine:

Created container accessible with:

Failing Job step:

#!/bin/bash -eo pipefail docker-compose -f .docker/docker-compose.yml -f .docker/ --env-file .docker/.env build

postgres uses an image, skipping 
Building PHP 
ERROR: Couldn't connect to Docker daemon at - is it running?

So, I guess, the docker host/port does seem right, doesn’t it?

The weird part is that I literally copied the config from another project at CircleCI, which does not show any errrors :slight_smile:

Does anyone have any ideas?

Appreciate the help :slight_smile:

Anybody? :slight_smile:

Miraculously, now it passes without issue. Closing the topic :slight_smile:

Just to post a follow-up, if anyone stumbles upon this:

In my docker-compose step I had an environment section with one value BUILD_TAG. With this section in place, my job would fail with the above error. As soon as I remove this, it passes without any issue.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.