This question is not the duplicate of this. The issue in that question is with starting a docker instance but this one is associated with binding docker with docker-compose.
I am trying to run docker-compose inside docker:dind image.
So created my own image with following Dockerfile.
FROM docker:dind
RUN apk add py-pip
RUN apk add python-dev libffi-dev openssl-dev gcc libc-dev make
RUN pip install docker-compose
RUN addgroup ${USER} docker
But running docker-compose command throws following error,
yarn run v1.16.0
$ docker-compose -f docker-compose.yml run test
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run test stderr:
Couldn't connect to Docker daemon at http+docker://localhost - is it running?
If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.
error Command failed with exit code 1.
How can it be fixed. The os in docker:dind is Alpine linux.
You don't need to build docker-compose image from scratch.
There is official docker-compose image available on dockerhub. Use that.
For instructions on how to run it, please check this out.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With