此问题不是this的重复项。该问题的问题在于启动一个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
中的os是Alpine
linux。