use pwsh as entrypoint for step scripts instead of powershell #34
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation looks for an entrypoint named
powershell
, which exists in images likemcr.microsoft.com/powershell:windowsservercore-ltsc2022
, but not inmcr.microsoft.com/powershell:nanoserver-ltsc2022
, where the cross-platform variantpwsh
is used. Because of this, only images based on windowsservercore can be used.The windowsservercore-based image is 5.37GB, while the nanoserver-based image is 553MB, saving a significant amount of space.
The windowsservercore-based images also offer the
pwsh
command, so by usingpwsh
as entrypoint instead ofpowershell
, both nanoserver-based and windowsservercore-based images can be used.