none
Invalid volume spec when using -v parameter RRS feed

  • Question

  • I'm running this on Hyper-V 2016:
    docker run -d -p 1433:1433 -v C:/temp/:C:/temp/ -e sa_password=<MY_SUPERSECURE_PASSWORD> -e ACCEPT_EULA=Y microsoft/mssql-server-windows-express

    Gives me this error

    docker : C:\Program Files\Docker\docker.exe: Error response from daemon: invalid bind mount spec "C:/temp/:C:/temp/": invalid volume specification:
    'C:/temp/:C:/temp/': invalid mount config for type "bind": GetFileAttributesEx c:\temp\: The filename, directory name, or volume label syntax is
    incorrect..
        + CategoryInfo          : NotSpecified: (C:\Program File... is incorrect..:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError
    Thursday, November 17, 2016 10:03 PM

Answers

  • It works fine, C:\temp on the host had been created as a file and not a directory for some reason. Probably because it was 2am...
    • Marked as answer by MarkAllison Friday, November 18, 2016 10:52 AM
    Friday, November 18, 2016 10:52 AM

All replies

  • If this is a Hyper-V container the root C:\temp would be the container host(?) which would be the root image(?) or the Hyper-V host(?)

    Not sure if that is allowed.

    If it is a Windows Container, it is the hosting OS, which should definitely be possible.

    I was also wondering if "C:/temp/" was the issue instead of "C:/temp"


    Brian Ehlert
    http://ITProctology.blogspot.com
    Learn. Apply. Repeat.

    Thursday, November 17, 2016 10:19 PM
    Moderator
  • Hi Brian

    It runs fine without the -v switch. It's a simple setup. Hyper-V physical host with a container. I also tried without the trailing / on the paths but still get:

        docker : C:\Program Files\Docker\docker.exe: Error response from daemon: invalid bind mount spec "C:/temp:C:/temp":
    invalid volume specification: 'C:/temp:C:/temp': invalid mount config for type "bind": source path must be a directory.
        + CategoryInfo          : NotSpecified: (C:\Program File...be a directory.:String) [], RemoteException
        + FullyQualifiedErrorId : NativeCommandError

    Friday, November 18, 2016 12:22 AM
  • It works fine, C:\temp on the host had been created as a file and not a directory for some reason. Probably because it was 2am...
    • Marked as answer by MarkAllison Friday, November 18, 2016 10:52 AM
    Friday, November 18, 2016 10:52 AM