0

I'm automating a SQL Server install on a Windows container. Here's my install command:

c:\setup.exe /q /ACTION=Install /INSTANCENAME=MSSQLSERVER /FEATURES=SQLEngine /UPDATEENABLED=0 /SQLSVCACCOUNT='NT AUTHORITY\Network Service' /SQLSYSADMINACCOUNTS='BUILTIN\ADMINISTRATORS' /TCPENABLED=1 /NPENABLED=0 /IACCEPTSQLSERVERLICENSETERMS

I receive error 0x851A001A in the C:\Program Files\Microsoft SQL Server\130\Setup Bootstrap\Log\Summary.txt.

So I tried SQLSVCACCOUNT='NT AUTHORITY\Network Service' and SQLSVCACCOUNT='NT AUTHORITY\SYSTEM'. Both fail the same way.

Despite the error SQL Server service will actually install, so I tried to start manually from powershell:

Start-Service SQLSERVERAGENT

That command failed. It seems my Docker container account doesn't have permissions to start the service. A whoami command within the Docker container shows my user as "Manager\ContainerAdministrator"

Setting SQLSVCACCOUNT="Manager\ContainerAdministrator" won't even install SQL Server.

Note that using the same install files and install command, SQL Server will install correctly on a VMWare machine. Only when installing on Docker do I see this error.

Is there a way to force start the SQL Server service? Running powershell as admin didn't do the trick. Are my Docker container credentials out of sync with the credentials I'm installing SQL Server with?

Possibly related issue: https://github.com/Microsoft/mssql-docker/issues/279

  • Why are you not using official SQL image from Microsoft?https://hub.docker.com/r/microsoft/mssql-server-windows-express/ – Gregory Suvalian Aug 21 '18 at 14:48
  • Because that image installs SQL Server 2017 and our product only supports up to 2016. I may end up asking Product Owners if we can just test with 2017 and pull this image, but that is my backup plan. – PadawanLearner Aug 21 '18 at 17:26
  • You are aware that SQL server is NOT supported by Microsoft inside windows containers, only Linux one (imagine that bearing in mind it's Microsoft product) is supported? – Gregory Suvalian Aug 21 '18 at 17:28
  • https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows-developer/dockerfile Specifically line 1: FROM microsoft/windowsservercore Is that dockerfile not maintained now? – PadawanLearner Aug 21 '18 at 17:33
  • Docker hub was updated 6 month ago so yes Microsoft is not actively rebuilding this container image. As I said above they don't support it even if they did. Are you planning this for the dev work or actually investigating for use in production? – Gregory Suvalian Aug 21 '18 at 17:35
  • I see, thanks! Yeah this would be dev + QA release testing – PadawanLearner Aug 21 '18 at 17:42
  • This dockerfile seems to be based on 2016. See if it works for you https://github.com/Microsoft/mssql-docker/blob/master/windows/mssql-server-windows/dockerfile – Gregory Suvalian Aug 21 '18 at 17:46

0 Answers0