[英]Run docker-compose inside docker:dind
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
. 该问题的问题在于启动
docker
实例,但这与通过docker-compose
绑定docker
相关联。
I am trying to run docker-compose
inside docker:dind
image. 我正在尝试在
docker:dind
image中运行docker:dind
docker-compose
。 So created my own image with following Dockerfile
. 因此,使用以下
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, 但是运行
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.
How can it be fixed. 怎么解决。 The os in
docker:dind
is Alpine
linux. docker:dind
的操作系统是Alpine
linux。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.