C
C#12mo ago
Hejle

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:
# escape=`
# Copyright (c) Microsoft Corporation.
# escape=`
# Copyright (c) Microsoft Corporation.
But this fails with: "Syntax error - can't find = in "`". Must be of the form: name=value" so I have changed that to:
# escape=\
# Copyright (c) Microsoft Corporation.
# escape=\
# Copyright (c) Microsoft Corporation.
My DockerFile can be seen here:
11 Replies
Hejle
HejleOP12mo ago
Unrelated, but formatting a Discord-Post with a Backtick in it, is really tricky catthinking
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Hejle
HejleOP12mo ago
I am using QWERTY. The problem was that I had forgotten to escape the backticks who was not defining codeblocks
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Hejle
HejleOP12mo ago
As far as I understand it is a small WindowsImage.
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Hejle
HejleOP12mo ago
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
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Hejle
HejleOP12mo ago
sad
Unknown User
Unknown User12mo ago
Message Not Public
Sign In & Join Server To View
Hejle
HejleOP12mo ago
I recon it would be easy on Linux, yeah
Want results from more Discord servers?
Add your server