I have a compose (yml) file that I use to bring servers up and down as I need them. I have just updated my Docker Desktop on Windows to version 2.3.0.2.
My Sql Server instance will not stay running now.
My yaml file is simply:
version: '3.2'
services:
dev-mssql-server:
image: mcr.microsoft.com/mssql/server
container_name: dev-mssql-server
volumes:
- type: bind
source: C:\Data\sqlserver-linux-container
target: /var/opt/mssql/data
networks:
dvlpnet:
ipv4_address: 172.22.0.20
environment:
- ACCEPT_EULA=Y
- SA_PASSWORD=ReallyBitchin#1Password
- MSSQL_PID=Developer
ports:
- "15785:1433"
networks:
dvlpnet:
ipam:
config:
- subnet: 172.22.0.0/24
volumes:
sqlserver-linux-container:
And the message from the Docker Dashboard is:
Attaching to dev-mssql-server
dev-mssql-server | SQL Server 2019 will run as non-root by default.
dev-mssql-server | This container is running as user mssql.
dev-mssql-server | Your master database file is owned by root.
dev-mssql-server | To learn more visit https://go.microsoft.com/fwlink/?linkid=2099216.
dev-mssql-server | 2020-05-18 18:25:20.88 Server Setup step is FORCE copying system data file 'C:\templatedata\model_replicatedmaster.mdf' to '/var/opt/mssql/data/model_replicatedmaster.mdf'.
2020-05-18 18:25:21.13 Server ERROR: Setup FAILED copying system data file 'C:\templatedata\model_replicatedmaster.mdf' to '/var/opt/mssql/data/model_replicatedmaster.mdf': 1(Incorrect function.)
dev-mssql-server | ERROR: BootstrapSystemDataDirectories() failure (HRESULT 0x80070001)
dev-mssql-server exited with code 1
And some of the Docker log file is here:
[13:26:48.754][GoBackendProcess ][Info ] stopping accepting connections on docker-proxy-port-approver/approver-6129484611666145821 tcp forward from 0.0.0.0:15785 to 0.0.0.0:0
[13:26:48.754][GoBackendProcess ][Error ] wsl unexpose error:Post http://unix/forwards/unexpose/port: open \\\\.\\pipe\\dockerWsl2BootstrapExposePorts: The system cannot find the file specified.
[13:26:48.754][GoBackendProcess ][Info ] external: POST /forwards/unexpose/port 200 \"Go-http-client/1.1\" \"\
[13:26:49.255][ApiProxy ][Info ] proxy << POST /v1.25/containers/ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6/start (515.4339ms)\n
[13:26:49.257][GoBackendProcess ][Info ] vpnkitExposer.Add(ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6, [TCP 0.0.0.0:15785 -> 127.0.0.1:15785])
[13:26:49.257][GoBackendProcess ][Info ] adding docker-containers/ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6 tcp forward from 0.0.0.0:15785 to 127.0.0.1:15785
[13:26:49.258][GoBackendProcess ][Error ] wsl expose error:Post http://unix/forwards/expose/port: open \\\\.\\pipe\\dockerWsl2BootstrapExposePorts: The system cannot find the file specified.
[13:26:49.260][GoBackendProcess ][Info ] grpcfuseSharer.Add(ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6, [src=C:\\Data\\sqlserver-linux-container,dst=/var/opt/mssql/data,option=rw])
[13:26:49.260][GoBackendProcess ][Info ] lazily recomputing file watches
[13:26:49.260][GoBackendProcess ][Info ] watching path C:\\Data\\sqlserver-linux-container\\
[13:26:49.260][GoBackendProcess ][Info ] invalidating caches for C:\\Data\\sqlserver-linux-container\\
[13:26:49.261][ApiProxy ][Info ] proxy >> GET /containers/ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6/json\n
[13:26:49.266][ApiProxy ][Info ] proxy << GET /containers/ab6315ce510c8143da6760f54425ba625a2acffb5e6fb387ca3120b992b7aef6/json (5.0047ms)\n
[13:26:49.269][GoBackendProcess ][Info ] caches invalidated for C:\\Data\\sqlserver-linux-container\\
I made sure that my C drive was still shared properly in the new version of Docker Desktop. I even redundantly added c:\data and c:\data\sqlserver-linux-container directories as shared after I started seeing these errors.
I was not able to find much out on the interwebbies on how this new version of Docker Desktop handles Windows host volumes.
I removed version 2.3.0.2 and reinstalled the older version 2.2.0.5 and everything worked happily again.
Has anyone run into this? Is there a solution yet that I was not able to find?
We have same problem. Our scouting showed that:
Docker Desktop now allows sharing individual folders, rather than whole drives, giving more control to users over what is being shared.
mssql:
container_name: $PROJECTNAME-mssql
restart: ${DOCKER_RESTART}
image: "mcr.microsoft.com/mssql/server:2019-CU4-ubuntu-16.04"
volumes:
# konfiguracja dla lokalnej bazy mssql na dockerze
- ./var/data/mssql/data:/var/opt/mssql/data
- ./var/data/mssql/log:/var/opt/mssql/log
- ./var/data/mssql/secrets:/var/opt/mssql/secrets
Still doesn't work.
Edit:
There is an active issue registered on github related to this one:
User contributions licensed under CC BY-SA 3.0