Skip to content

Errror mkdir /host_mnt/c: file exists when restarting docker container with mount #1560

Closed
@eino-makitalo

Description

@eino-makitalo

Expected behavior

Container should start normally

Actual behavior

C:\Users\einom>docker start f96263b10996
Error response from daemon: error while creating mount source path '/host_mnt/c/Users/einom/Documents/projects/cap/src': mkdir /host_mnt/c: file exists
Error: failed to start containers: f96263b10996

Information

Docker version: 17.12.0-ce-win47 (15139)

Windows 10 Pro
Version: 1709
Build: 16299.192

Whole C drive is shared with docker VM

Steps to reproduce the behavior

  1. start container with command similar than me in my home dir
    docker run -d --name sonarqube -p 9000:9000 -p 9092:9092 -v c:/Users/einom/Documents/projects/cap/src:/src:rw sonarqube
  2. use container and enjoy that directory in container /src is mounted OK
  3. docker stop this container
  4. docker start container ... and you got error ... mkdir /host_mnt/c file exist.

Of cource it exists because if I understand correctly this /host_mnt/c should point to my whole C: drive ?

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