Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use latest PowerShell version #1127

Merged
merged 3 commits into from
Jul 10, 2024
Merged

Use latest PowerShell version #1127

merged 3 commits into from
Jul 10, 2024

Conversation

mthalman
Copy link
Member

@mthalman mthalman commented Jul 8, 2024

Related to #1121 (comment)

Updates installation of PowerShell to get the latest version. This aligns with other Dockerfiles which install PowerShell from PMC, which ends up being the latest version. Right now, the latest version is PowerShell 7.4.

For the Nano Server Dockerfile, PowerShell no longer produces Nano Server images after 7.2. So we need to roll our own.

@mthalman
Copy link
Member Author

mthalman commented Jul 8, 2024

These changes fail with this error:

Step 5/9 : COPY --from=mcr.microsoft.com/powershell:windowsservercore-ltsc2022 [ "C:\\Program Files\\PowerShell\\latest\\", "C:\\Program Files\\PowerShell\\" ]
windowsservercore-ltsc2022: Pulling from powershell
invalid from flag value mcr.microsoft.com/powershell:windowsservercore-ltsc2022: a Windows version 10.0.20348-based image is incompatible with a 10.0.17763 host

Of course I can't use the ltsc2022 image from an 1809 machine. Docker Desktop tricked me by making this work locally.

@mthalman mthalman requested a review from mmitche July 8, 2024 21:11
@mthalman
Copy link
Member Author

ping @dotnet/dotnet-docker-reviewers

@mthalman mthalman merged commit 266cb43 into dotnet:main Jul 10, 2024
36 checks passed
@mthalman mthalman deleted the powershell branch July 10, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants