Skip to content
Advertisement

Unable to bind mount a Windows folder in a Linux SQL Server docker image

I’m trying to run the docker image mcr.microsoft.com/mssql/server:2019-latest on a windows host.

When running this command line, everything works fine:

JavaScript

When I try to bind mount the /var/opt/mssql/data folder to access it’s content from my windows host, I get the following error:

JavaScript

It looks like this issue: https://support.microsoft.com/en-us/help/4212960/fix-sql-server-2017-won-t-start-with-linux-container-image-on-docker Which is supposed to be fixed. But I tried with several version of the docker image, including mcr.microsoft.com/mssql/server:2017-CU7-ubuntu, which is supposed to be the version in which that issue was fixed.

Advertisement

Answer

It seems to be an issue in the new Docker for Windows version. I did rollback from 2.3.0.2 to 2.2.0.5, and now the bind mount works as expected.

An issue has been raised about it in the mssql-docker github: https://github.com/microsoft/mssql-docker/issues/600

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement