Closed
Description
Expected behavior
Should be able to bind mount the docker socket as explained
in http://jpetazzo.github.io/2015/09/03/do-not-use-docker-in-docker-for-ci/ using docker-compose
Actual behavior
I can successfully run the command
docker run -v /var/run/docker.sock:/var/run/docker.sock -it docker
But when I try to use within a docker-compose.yml
file I get the following error
Creating docker_docker_1 ... error
ERROR: for docker_docker_1 Cannot create container for service docker: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path'
ERROR: for docker Cannot create container for service docker: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path'
ERROR: Encountered errors while bringing up the project.
Information
Docker Community Edition
Version 18.03.0-ce-rc3-win56 (16433)
Channel: edge
b6990be
Note: Just updated Docker and I did not receive this error in previous version.
docker-compose.yml
version: '3'
services:
docker:
image: docker
stdin_open: true
tty: true
volumes:
- /var/run/docker.sock:/var/run/docker.sock
Running docker-compose up
gives the following error
λ docker-compose up
Creating docker_docker_1 ... error
ERROR: for docker_docker_1 Cannot create container for service docker: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path'
ERROR: for docker Cannot create container for service docker: b'Mount denied:\nThe source path "\\\\var\\\\run\\\\docker.sock:/var/run/docker.sock"\nis not a valid Windows path'
ERROR: Encountered errors while bringing up the project.
Steps to reproduce the behavior
- Run
docker-compose up
using abovedocker-compose.yml