I'm trying to install SQL Server and .NET 4.7.2 in a Docker container.
I've tried to install them through a docker file, but it keeps failing when installing .NET 4.7.2 because it needs to restart the 'computer'. I tried that through docker build a dockerfile.
I also tried to install .net 4.7.2 in my SQL Server container through Chocolatey, but it also need to restart. Which won't work.
I also tried to install SQL Server on my .net 4.7.2 container through Chocolatey, but it still fails.
Next step, I'm thinking of creating a SQL Server container and another .net 4.7.2 container that will run my tests and start my service. Then linking them so it can communicate to the database in the SQL Server container. The problem with this is I'm having difficulty linking them together.
Note that this is not an ASP.NET project (there's a lot of tutorials with ASP.NET and SQL Server, but does not apply to my case)...
See below for my dockerfile:
FROM microsoft/mssql-server-windows-developer
ENV sa_password=Passw0rd
ENV ACCEPT_EULA=Y
ENV download_url="https://download.microsoft.com/download/9/2/2/9228AAC2-90D1-4F48-B423-AF345296C7DD/EN/x64/DacFramework.msi"
ENV NET_DP_472 https://download.microsoft.com/download/6/E/4/6E48E8AB-DC00-419E-9704-06DD46E5F81D/NDP472-KB4054530-x86-x64-AllOS-ENU.exe
RUN Invoke-WebRequest -Uri $env:download_url -OutFile DacFramework.msi ; `
Start-Process msiexec.exe -ArgumentList '/i', 'DacFramework.msi', '/quiet', '/norestart' -NoNewWindow -Wait; `
Remove-Item -Force DacFramework.msi
# net framework -> 472
RUN Invoke-WebRequest $Env:NET_DP_472 -OutFile framework472.exe -UseBasicParsing;
Start-Process framework472.exe -ArgumentList '/q' -Wait;
Remove-Item -Force framework472.exe
If you add n to your -ArgumentList "/qn" this will prevent a reboot