-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Upgrade docker image BaseImage from powershell to dotnet/sdk #28527
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
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution! The pull request validation has started. Please revisit this comment for updated status. |
/azp run |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the Docker base images from PowerShell-specific images to .NET SDK 9.0 images across all Dockerfile variants. This change aligns with moving to a .NET SDK-based build environment while maintaining support for PowerShell functionality.
Key changes:
- Replaced PowerShell base images with .NET SDK 9.0 equivalents across all platforms
- Updated package manager commands to match the new base image distributions
- Removed two legacy Dockerfile variants (Ubuntu 22.04 and UBI-9)
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
docker/Dockerfile-ubuntu-24.04 | Updated base image from PowerShell Ubuntu 24.04 to .NET SDK 9.0 Noble |
docker/Dockerfile-ubuntu-22.04 | Removed entire Ubuntu 22.04 Dockerfile variant |
docker/Dockerfile-ubi-9 | Removed entire UBI-9 Dockerfile variant |
docker/Dockerfile-debian-12 | Updated base image from PowerShell Debian 12 to .NET SDK 9.0 Bookworm Slim |
docker/Dockerfile-azurelinux-3.0-arm64 | Updated base image and added tar/gzip packages, fixed environment variable |
docker/Dockerfile-azurelinux-3.0 | Updated base image and added tar/gzip packages |
docker/Dockerfile-alpine-3.22 | Updated base image and package manager commands from yum to apk, corrected image names |
docker/Dockerfile-alpine-3.21 | Updated base image and corrected image/environment variable names |
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine3.22 | ||
RUN apk update && apk upgrade --no-cache |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original file was based on UBI-8 (using yum commands) but the new Alpine base image uses apk. However, the package manager command change from yum update -y && yum clean all
to apk update && apk upgrade --no-cache
is correct, but the filename suggests this should be Alpine 3.22 while the original was UBI-8. This appears to be a mismatch between filename and original content.
Copilot uses AI. Check for mistakes.
@@ -1,4 +1,4 @@ | |||
FROM mcr.microsoft.com/powershell:alpine-3.20 | |||
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine3.21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original base image was mcr.microsoft.com/powershell:alpine-3.20
but the new image uses Alpine 3.21. This version change should be intentional - verify that Alpine 3.21 is the correct target version and not Alpine 3.20.
Copilot uses AI. Check for mistakes.
Azure Pipelines successfully started running 3 pipeline(s). |
azure-powershell is targeting dotnet 8 right now, can you please make the base images dotnet 8 instead of dotnet 9? |
Description
Mandatory Checklist
Please choose the target release of Azure PowerShell. (⚠️ Target release is a different concept from API readiness. Please click below links for details.)
Check this box to confirm: I have read the Submitting Changes section of
CONTRIBUTING.md
and reviewed the following information:ChangeLog.md
file(s) appropriatelysrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
.## Upcoming Release
header in the past tense.ChangeLog.md
if no new release is required, such as fixing test case only.