The .NET team publishes Docker images with PowerShell preinstalled. This article shows you how to get started using PowerShell in the Docker container.
Find available imagesThese images require Docker 17.05 or newer. Also, you must be able to run Docker without sudo
or local administrative rights. For install instructions, see Docker's official documentation.
The .NET team publishes several Docker images designed for different development scenarios. Only the image for the .NET SDK contains PowerShell. For more information, see Official .NET Docker images.
Use PowerShell in a containerThe following command downloads the image containing the latest available stable versions of the .NET SDK and PowerShell.
docker pull mcr.microsoft.com/dotnet/sdk:9.0
Use the following command to start an interactive PowerShell session in the container.
docker run -it mcr.microsoft.com/dotnet/sdk:9.0 pwsh
To download and run the latest Long Term Support (LTS) version of PowerShell, change the image name to mcr.microsoft.com/dotnet/sdk:8.0
. When you use these image tags, Docker downloads the appropriate image for your host operating system. If you want an image for a specific operating system, you can specify the operating system in the image tag. See the Microsoft Artifact Registry for a list of available tags.
The .NET support policy defines how these images are supported. These images are provided for development and testing purposes only. If you need a production-ready image, you should build your own images. For more information about these Docker images, visit the dotnet-docker repository on GitHub.
The images previously published by the PowerShell team will be marked as deprecated in the Microsoft Container Registry (MCR).
TelemetryBy default, PowerShell collects limited telemetry without personal data to help aid development of future versions of PowerShell. To opt-out of sending telemetry, create an environment variable called POWERSHELL_TELEMETRY_OPTOUT
set to a value of 1
before starting PowerShell from the installed location. The telemetry we collect falls under the Microsoft Privacy Statement.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4