SQL container exits immediatly when run with persistent storage

I’m running Docker on Windows 10, running the following command to run a SQL container works just fine:

docker run -e “ACCEPT_EULA=Y”-e "SA_PASSWORD=Password123"
-p 1433:1433 --name sql1 `
-d mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu

but if I try to map in persistent storage using the following, it returns an Exited(1) status after around 5 seconds:
docker run -e “ACCEPT_EULA=Y”-e "SA_PASSWORD=8GjzJfdYNlXl"
-p 1433:1433 --name sql1 -v C:\DockerStorage:/var/opt/mssql
-d mcr.microsoft.com/mssql/server:vNext-CTP2.0-ubuntu

So exact same command, I just added in a -v and the location. I see some of the files copied in to the C:\DockerStorage location, but not all. I’ve tried running it with the -it and just -t option, but that hasn’t helped.

If I look at the logs I see the following:
This program has encountered a fatal error and cannot continue running at Fri Oct 26 01:52:27 2018
The following diagnostic information is available:

   Reason: 0x00000006
   Status: 0x40000015
  Message: Kernel bug check
  Address: 0x6a4e1200

Parameters: 0x10861f690
Stacktrace: 000000006a5ae47f 000000006a4e125b 000000006a4cff75
000000006a4ddd9b 000000006a5ac7c6 000000006a5ab28d
000000006a5e0fb2 000000006a721000 000000006a733000
000000006a73b000 00007f934f6384e0
Process: 11 - sqlservr
Thread: 15 (application thread 0x4)
Instance Id: 9eea6fbd-2dcf-40d2-ac9b-464ede2f3cf6
Crash Id: 3a66b052-922d-41c8-a90a-1370da9675bb
Build stamp: b327e62f232ab387d14856d756e004bceff6b4975d25a72b67fa8edce1301bc2

Ubuntu 16.04.5 LTS
Capturing core dump and information…
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.11.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.


I am having the same issue but here I am using Kubernetes instead . And attached the tool’s versions fyi.

here is the error I am getting :
This program has encountered a fatal error and cannot continue running at Tue Mar 26 19:31:35 2019
The following diagnostic information is available:

   Reason: 0x00000006
   Status: 0x40000015
  Message: Kernel bug check
  Address: 0x6ac44180

Parameters: 0x10861f680
Stacktrace: 000000006ad2fc73 000000006ac441db 000000006ac31422
000000006ac3fe62 000000006ad2e08a 000000006ad2cb8d
000000006ad6c0d2 000000006b0ac000 000000006b038000
000000006b040000 0000000000000001
Process: 7 - sqlservr
Thread: 11 (application thread 0x4)
Instance Id: 431e3486-e014-43a8-9b2b-332e18c6193d
Crash Id: d22fd168-c7db-409c-8334-21c2eb14a997
Build stamp: b2ce95e3a6684060d1d3bb1264841a1a8fc1d501ed6d1cfdb89cfcdde8048253
Distribution: Ubuntu 16.04.6 LTS
Processors: 4
Total Memory: 8341340160 bytes
Timestamp: Tue Mar 26 19:31:35 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
Captured a dump with paldumper

I solved the problem by restricting the system resources in the Kubernetes deployment file like below
resources:
requests:
memory: “512Mi”
cpu: “500m”
limits:
memory: “1024Mi”
cpu: “1000m”

This is also happening in SQL Server 2019. And changing the resources as suggested does not help

Fixed this by using /var/opt/mssql/data as mount path instead of /var/opt/mssql/

"Host volume mapping for Docker on Windows does not currently support mapping the complete /var/opt/mssql directory. However, you can map a subdirectory, such as /var/opt/mssql/data to your host machine.

Deploy and connect to SQL Server Linux containers - SQL Server | Microsoft Learn"