Hi,
first of all, I am using Docker Desktop on Windows, and I strongly believe, that my problem is completely Windows specific. Sorry for that!
I have learned, that I can launch a container from another container by using the option
docker container run -v /var/run/docker.sock:/var/run/docker.sock
when launching the fatter container with “docker run”. Good to know!
I’d prefer, though, if I could have the same with docker-compose. I tried the snippet below
volumes:
- dockerSock:/var/run/docker.sock:/var/run/docker.sock
However, upon “docker-compose up”, I am getting the error message “Cannot create container for service MYSVC: invalid mode: /var/run/docker.sock”. I suspect, because docker-compose doesn’t have the perspective of a running docker daemon, so doesn’t know, what /var/run/docker.sock might be.
Is it possible, to convince docker-compose to launch anyways? Or any other workaround?
Thanks,
Jochen