Is it possible somehow to add Powershell Core to the AspNet Nano Server base images?
We use a multistage dockerfile to produce an image containing our .net core web application. The final image is based on mcr.microsoft.com/dotnet/core/aspnet:3.1-nanoserver-1809 with our .net core binaries added (in order to keep image size to a minimum).
We would like Powershell Core to be included in the final image, for initialization and debugging purposes, but haven't found a way so far. We have considered all sorts of commandline installation options (msiexec, choco and googled a lot) without finding a solution.
Any help is very much appreciated!
From Microsoft:
Although there is no official
powershell coresupport foraspnet:3.1-nanoserver-1809, there is an officialpowershell coresupport for purenanoserver-18.09, see this with the image tag: lts-nanoserver-1809So, the last thing you need to do is:
Just follow microsoft's suggestion to
include powershell core when build your own image.Next is the Dockerfile about how
nanoserver-18.09to includepowershell core, you could copy this to write your own dockerfile to addpowershell coreto youraspnet:3.1-nanoserver-1809: