这个问题不是这的翻版。这个问题的问题是启动一个docker实例,但这个实例与将docker与docker-compose绑定有关。
我试图在docker-compose映像中运行docker:dind。所以用下面的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但是运行docker-compose命令会引发以下错误,
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.怎么能修好呢。docker:dind中的操作系统是Alpine linux。
https://stackoverflow.com/questions/57289772
复制相似问题