Skip to content

docker-compose bind mount docker.sock not a valid Windows path #1829

Closed
@ameier38

Description

@ameier38

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

  1. Run docker-compose up using above docker-compose.yml

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions