none
Can't mount container volume if the directory exists inside and is not empty RRS feed

  • Question

  • I'm trying to create a container using a simple nginx image and I want to be able to mount the html folder to insert my own html pages.

    Here is the command I'm using:

    docker run -d -p 83:80 -v C:\nginx\dev:C:\nginx\nginx-1.11.6\html nginx-demo

    It fails with the following error:

    C:\Program Files\Docker\docker.exe: Error response from daemon: container a2872f7a7db466078626a21d14b15955316971b22903b875ff51f82e1b117b53 encountered an error during CreateContainer: failure in a Windows system call: The directory is not empty. (0x91) extra info: {"SystemType":"Container","Name":"a2872f7a7db466078626a21d14b15955316971b22903b875ff51f82e1b117b53","Owner":"docker","IsDummy":false,"VolumePath":"\\\\?\\Volume{f220d125-b007-11e6-8422-8bffcf2910a5}","IgnoreFlushesDuringBoot":true,"LayerFolderPath":"C:\\ProgramData\\docker\\windowsfilter\\a2872f7a7db466078626a21d14b15955316971b22903b875ff51f82e1b117b53","Layers":[{"ID":"99433a20-e7e1-53a7-90e6-2c1f5f71b75d","Path":"C:\\ProgramData\\docker\\windowsfilter\\6179def611d71d63e850d76fa869d4628550137679e58c0dcabb37447aa54c2d"},{"ID":"ca388ca5-2f84-584a-af88-fa0f5841e28b","Path":"C:\\ProgramData\\docker\\windowsfilter\\871f070156b4d1b0f7fb8c3ebd77c64b292ca2c59594b0df9511f3a95aed8869"},{"ID":"14f8303c-0125-5ee8-ac6a-ef465b428ed4","Path":"C:\\ProgramData\\docker\\windowsfilter\\f4b72c63ffc1b0b835588f027e1a5150efd98653a5121fcd560b0d4504fa593e"},{"ID":"659b9e14-2562-573f-be53-b948978b315a","Path":"C:\\ProgramData\\docker\\windowsfilter\\2e33b31e1b446022dcdab0234c6f44784bdb7db1eb8d3d2ad09b2681d5fb55b6"},{"ID":"e7678b03-000d-5e7a-b3ac-5c7365af9232","Path":"C:\\ProgramData\\docker\\windowsfilter\\72c7ffc595c8135ce40dd6c20c615d9ff0db175fb388990c4a70723937df2c04"},{"ID":"a2fe3071-87da-5b38-a8c4-9f0aa1e2dca1","Path":"C:\\ProgramData\\docker\\windowsfilter\\5acc876ebd139ef37a83a9cd629eba4d0728e1a639f208cd2db383e0c0b9f50f"}],"HostName":"a2872f7a7db4","MappedDirectories":[{"HostPath":"c:\\nginx\\dev","ContainerPath":"c:\\nginx\\nginx-1.11.6\\html","ReadOnly":false,"BandwidthMaximum":0,"IOPSMaximum":0}],"HvPartition":false,"EndpointList":["0592a536-8a1a-46e4-ba53-e1b2b1ee469d"],"Servicing":false,"AllowUnqualifiedDNSQuery":true}.

    Here is the docker version:
    Docker version 1.12.2-cs2-ws-beta, build 050b611

    Here is the relevant docker info:

    Containers: 3
     Running: 2
     Paused: 0
     Stopped: 1
    Images: 14
    Server Version: 1.12.2-cs2-ws-beta
    Storage Driver: windowsfilter
     Windows:
    Logging Driver: json-file
    Plugins:
     Volume: local
     Network: nat null overlay
    Swarm: inactive
    Default Isolation: process
    Kernel Version: 10.0 14393 (14393.351.amd64fre.rs1_release_inmarket.161014-1755)
    Operating System: Windows Server 2016 Standard
    OSType: windows
    Architecture: x86_64
    CPUs: 1
    Total Memory: 3 GiB

    Any help will be greatly appreciated!

    Monday, November 21, 2016 9:46 PM

All replies