Docker Community Forums

Share and learn in the Docker community.

Unable to map C directory on Windows 10 to a volume for sql server on linux

Hi

i am unable to map C directory on Windows 10 to a volume for sql server on linux.

Is this a known issue?

  • Issue type
    Mapping linux container docker volume to a directory C drive on a Windows 10 machine
    when using sql server on a linux image: , mcr.microsoft.com/mssql/server:2017-latest

  • OS Version/build
    Windows 10

  • App version
    Docker:
    Version 2.0.0.3 (31259)
    Channel: stable
    Build: 8858db3

  • Steps to reproduce
    Run following command

c:\temp> docker run -e “ACCEPT_EULA=Y” -e “MSSQL_SA_PASSWORD=GEps2006” --name "sql1" -p 1401:1433
-v c:/dockervolume/:/var/opt/mssql `
mcr.microsoft.com/mssql/server:2017-latest
docker : This program has encountered a fatal error and cannot continue running at Sun May 5 16:27:16 2019
At line:1 char:2

  • docker run -e “ACCEPT_EULA=Y” -e “MSSQL_SA_PASSWORD=skui902006” `
  •  + CategoryInfo          : NotSpecified: (This program ha...5 16:27:16 2019:String) [], RemoteException
     + FullyQualifiedErrorId : NativeCommandError
    
    

The following diagnostic information is available:
Reason: 0x00000006
Status: 0x40000015
Message: Kernel bug check
Address: 0x6c244180
Parameters: 0x10861f680
Stacktrace: 000000006c32fc73 000000006c2441db 000000006c231422
000000006c23fe62 000000006c32e08a 000000006c32cb8d
000000006c36c0d2 000000006c6ac000 000000006c638000
000000006c640000 0000000000000001
Process: 7 - sqlservr
Thread: 11 (application thread 0x4)
Instance Id: e74a73be-478a-446a-beb2-7c175776cd8c
Crash Id: ebcc5fae-8112-41e5-83dd-10cb63592c5c
Build stamp: b2ce95e3a6684060d1d3bb1264841a1a8fc1d501ed6d1cfdb89cfcdde8048253
Distribution: Ubuntu 16.04.6 LTS
Processors: 2
Total Memory: 2076532736 bytes
Timestamp: Sun May 5 16:27:16 2019

Ubuntu 16.04.6 LTS
Capturing core dump and information to /var/opt/mssql/log…
dmesg: read kernel buffer failed: Operation not permitted
No journal files were found.
No journal files were found.
Attempting to capture a dump with paldumper
WARNING: Capture attempt failure detected
Attempting to capture a filtered dump with paldumper
WARNING: Attempt to capture dump failed. Reference /var/opt/mssql/log/core.sqlservr.7.temp/log/paldumper-debug.log for details
Attempting to capture a dump with gdb
WARNING: Unable to capture crash dump with GDB. You may need to
allow ptrace debugging, enable the CAP_SYS_PTRACE capability, or
run as root.

As a general rule, don’t mount a host directory into a database container, use a named volume instead. Especially in this case where you mount from Windows to Linux, there are too many steps between the files on the host and their representation in the container.

Thanks for the suggestion, Tekki,