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