简体   繁体   English

无法绑定在 Linux SQL 服务器中安装 Windows 文件夹 Z05B6053C41A2130AFDZimageBDAE1

[英]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.我正在尝试在 windows 主机上运行 docker 映像 mcr.microsoft.com/mssql/server:2019-latest。

When running this command line, everything works fine:运行此命令行时,一切正常:

docker run --rm -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=My_Password" -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest

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:当我尝试绑定挂载 /var/opt/mssql/data 文件夹以从我的 windows 主机访问它的内容时,我收到以下错误:

PS C:\Docker> docker run --rm -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=My_Password" -v C:\SQL\data:/var/opt/mssql/data -p 1433:1433 mcr.microsoft.com/mssql/server:2019-latest
SQL Server 2019 will run as non-root by default.
This container is running as user mssql.
To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
2020-05-13 20:39:01.91 Server      Setup step is copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf'.
2020-05-13 20:39:01.99 Server      ERROR: Setup FAILED copying system data file 'C:\templatedata\master.mdf' to '/var/opt/mssql/data/master.mdf':  31(A device attached to the system is not functioning.)
ERROR: BootstrapSystemDataDirectories() failure (HRESULT 0x8007001f)

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.看起来像这个问题: https://support.microsoft.com/en-us/help/4212960/fix-sql-server-2017-won-t-start-with-linux-container-image-on-docker哪个应该是固定的。 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.但我尝试了几个版本的 docker 映像,包括 mcr.microsoft.com/mssql/server:2017-CU7-ubuntu,它应该是修复该问题的版本。

It seems to be an issue in the new Docker for Windows version.这似乎是 Windows 版本的新 Docker 中的问题。 I did rollback from 2.3.0.2 to 2.2.0.5, and now the bind mount works as expected.我确实从 2.3.0.2 回滚到 2.2.0.5,现在绑定挂载按预期工作。

An issue has been raised about it in the mssql-docker github: https://github.com/microsoft/mssql-docker/issues/600在 mssql-docker github: https://github.com/microsoft/mssql-docker/issues/600中提出了一个关于它的问题

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Linux Docker映像上运行的应用程序无法连接到本地Windows计算机上的SQL Server - Application running on Linux Docker image, is unable to connect to SQL server on local windows machine 无法从 Docker 容器(Linux 映像)连接到 SQL Server - Unable to connect to SQL Server from Docker container (Linux image) SQL Server Linux Docker 映像不断退出 - SQL Server Linux Docker image keeps exiting Docker (Linux) 和 Windows 主机中 SQL Server 的 MSDTC 配置问题 - MSDTC configuration issues with SQL Server in Docker (Linux) and Windows Host 将 SQL Server 的 Linux ODBC 驱动程序添加到 Kaggle/Python docker 映像 - Adding Linux ODBC drivers for SQL Server to a Kaggle/Python docker image 无法通过SQL Server Management Studio连接到SQL Server Linux Docker容器 - Unable to connect to SQL Server Linux Docker container via SQL Server Management Studio 无法使用 KeyCloak 的 JBoss docker 映像连接到 SQL 服务器 - Unable to connect to SQL server wuth JBoss docker image for KeyCloak 无法在Linux中的MSSQL RC1服务器设置中挂载数据目录 - Unable to mount data directory in MSSQL RC1 server setup in linux 如何从 .net Core Linux Docker 容器(使用 Docker for Windows)连接到 Internet 上的 Sql Server? - How can I connect to a Sql Server on the internet from a .net Core Linux Docker container (using Docker for Windows)? 具有NFS安装作为卷映射的SQL Server Docker容器 - SQL Server docker container with NFS mount as volume mapping
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM