Open cdossantos opened 7 years ago
Hi Santos -
Could you please paste the whole docker run command that you are using so we can troubleshoot further?
Below is an example that attaches a demo database from an .mdf and .ldf. Note that the demo.mdf and demo_log.ldf files (in the below example) need to be in the host location: D:\DATA\
docker run -d -p 1433:1433 -v D:\DATA\:"C:\SQL\DATA\" -e ACCEPT_EULA=Y -e attach_dbs="[{'dbName':'Demo','dbfiles':['C:\SQL\DATA\demo.mdf', 'C:\SQL\DATA\demo_log.ldf']}]" --env sa_password=Password1! microsoft/mssql-server-windows-express
Thanks, Perry
Hi Santos - Are you still having issues?
Hi,
I tested with something similar as your example and worked.
Thanks.
Hello,
When I use the -e attach_dbs="my json string" I get: C:\Program Files\Docker\docker.exe: Error parsing reference: "–e" is not a valid repository/tag: invalid reference format. See 'C:\Program Files\Docker\docker.exe run --help'.
It seems that docker isn't understanding the "my json string" as a string and therefore -e isn't recognized as environment variable. I tried single quotes with same result.
Any ideas? Thank you in advance
Santos