This is a known issue: mapping volumes on Macs isn't supported yet. You can follow that Github issue for more news, like when it's fixed.
Until then, no, people aren't doing anything more than simple testing with that combination of tools (Mac, Docker, Linux, SQL Server).
If you need to do real, productive development on a platform that's supported today, use:
- The current supported version of SQL Server (2016, as of this writing)
- Running on a currently supported OS (Windows, as of this writing)
- If you insist on using a Mac as your hardware layer (as I do too), then the easiest way to bridge these technologies is a hypervisor like VMware Fusion or Parallels
I was istalling it on a docker container based on the debian:buster image,and i had the following error:
root@25d7455d0dfc:/# /opt/mssql/bin/mssql-conf setup
Traceback (most recent call last):
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 361, in <module>
main()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 357, in main
processCommands()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 262, in processCommands
COMMAND_TABLE[args.which]()
File "/opt/mssql/bin/../lib/mssql-conf/mssql-conf.py", line 75, in handleSetup
mssqlconfhelper.setupSqlServer(eulaAccepted, noprompt=args.noprompt)
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 971, in setupSqlServer
if not checkInstall():
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 941, in checkInstall
return runScript(checkInstallScript, True) == 0
File "/opt/mssql/lib/mssql-conf/mssqlconfhelper.py", line 930, in runScript
return subprocess.call([sudo, "-EH", pathToScript])
File "/usr/lib/python2.7/subprocess.py", line 172, in call
return Popen(*popenargs, **kwargs).wait()
File "/usr/lib/python2.7/subprocess.py", line 394, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1047, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
So visited the python script at line 930:
vim +930 /opt/mssql/lib/mssql-conf/mssqlconfhelper.py
And I saw this if
condition:
if (runAsRoot):
if(checkSudo() == False):
printError(_("Elevated privileges required for this action. Please run in 'sudo' mode."))
return (errorExitCode)
return subprocess.call([sudo, "-EH", pathToScript])
else:
return subprocess.call([pathToScript])
Since I'm running as root and it enters the first condition 'runAsRoot' the script run the following return subprocess.call([sudo, "-EH", pathToScript])
I changed that line to:
return subprocess.call([pathToScript])
After that, the setup command worked for me.
/opt/mssql/bin/mssql-conf setup
Best Answer
This worked for me on Debian 8 (Jessie) when I installed the pre-2017 vNext for dbfiddle:
apt-get install curl apt-transport-https sudo
deb http://ftp.debian.org/debian jessie-backports main
to/etc/apt/sources.list
apt-get update && apt-get install -t jessie-backports openssl ca-certificates
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
curl https://packages.microsoft.com/config/ubuntu/16.04/mssql-server.list | tee /etc/apt/sources.list.d/mssql-server.list
apt-get update && apt-get install mssql-server
sudo /opt/mssql/bin/mssql-conf setup
However I tried and failed to get the RTM Linux version of 2017 installed on Debian Stretch, ultimately using Ubuntu.