Docker - NanoServer - Dotnet with PowershellCore
I have created a DockerFile with Dotnet running in NanoServer, and got a bit annoyed at the CMD in there.
So I have spent hours trying to add PowerShellCore to it.
The closest, I think, is this post:
https://stackoverflow.com/questions/65104246/how-to-install-powershell-core-in-aspnet-nanoserver-docker-container
From there I have been look at this DockerFile:
https://github.com/PowerShell/PowerShell-Docker/blob/master/release/7-3/nanoserver2022/docker/Dockerfile
So, I have tried to run it with the DockerFile i have added.
Running this, my Container is created and everything works, but Powershell has not been added.
From the example in Github, the escapecharacter ` is used:
But this fails with: "Syntax error - can't find = in "`". Must be of the form: name=value" so I have changed that to:
My DockerFile can be seen here:
11 Replies
Unrelated, but formatting a Discord-Post with a Backtick in it, is really tricky
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I am using QWERTY.
The problem was that I had forgotten to escape the backticks who was not defining codeblocks
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
As far as I understand it is a small WindowsImage.
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
None of this is a blocker - since its just hobby stuff
And I could survive using Nano without powershell
So no, no blockers :)
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
Unknown User•12mo ago
Message Not Public
Sign In & Join Server To View
I recon it would be easy on Linux, yeah