From 81f258d175d7105189d73d29dacadfda11b9b8c6 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 11 Mar 2025 12:34:32 -0500 Subject: [PATCH 1/3] Update Docker information --- .../install/PowerShell-in-Docker.md | 81 +++++++++---------- 1 file changed, 36 insertions(+), 45 deletions(-) diff --git a/reference/docs-conceptual/install/PowerShell-in-Docker.md b/reference/docs-conceptual/install/PowerShell-in-Docker.md index c7afc169dc7d..395ade70c9e7 100644 --- a/reference/docs-conceptual/install/PowerShell-in-Docker.md +++ b/reference/docs-conceptual/install/PowerShell-in-Docker.md @@ -1,6 +1,6 @@ --- description: How to use PowerShell that's preinstalled in a Docker image. -ms.date: 08/01/2024 +ms.date: 03/11/2025 ms.devlang: powershell ms.topic: conceptual title: Using PowerShell in Docker @@ -8,76 +8,67 @@ title: Using PowerShell in Docker # Using PowerShell in Docker -We publish Docker images with PowerShell preinstalled. This article shows you how to get -started using PowerShell in the Docker container. +The .NET team publishes Docker images with PowerShell preinstalled. This article shows you how to +get started using PowerShell in the Docker container. ## Finding available images -The released images require Docker 17.05 or newer. It's also expected that you are able to run -Docker without `sudo` or local administrative rights. Please follow Docker's official -[instructions][01] to install `docker` correctly. +These images require Docker 17.05 or newer. It's also expected that you are able to run Docker +without `sudo` or local administrative rights. Please follow Docker's official [instructions][02] to +install `docker` correctly. -The release containers derive from the official distribution image, then install dependencies, and -finally install the PowerShell package. - -These containers live at [Microsoft Artifact Registry][05]. - -For more information about these Docker images, visit the [PowerShell-Docker][02] repository on -GitHub. +The .NET team publishes several Docker images designed for different development scenarios. The +image for the .NET SDK contains PowerShell. For more information, see +[Official .NET Docker images][01]. ## Using PowerShell in a container The following steps show the Docker commands required to download the image containing the latest available stable version of PowerShell and start an interactive PowerShell session. -```console -docker run -it mcr.microsoft.com/powershell -``` - -Use the following command to download and run the image containing the latest available preview -version of PowerShell. +The following command downloads the image containing the latest available stable versions of the +.NET SDK and PowerShell. ```console -docker run -it mcr.microsoft.com/powershell:preview +docker pull mcr.microsoft.com/dotnet/sdk:9.0 ``` -> [!IMPORTANT] -> The Docker images are built from official operating system (OS) images provide by the OS -> distributor. These images may not have the latest security updates. Microsoft recommends that you -> update the OS packages to the latest version to ensure the latest security updates are applied. - -### Remove the image when no longer needed -The following command is used to delete the Docker image when you no longer need it. +Use the following command to start an interactive PowerShell session in the container. ```console -docker rmi mcr.microsoft.com/powershell +docker run -it mcr.microsoft.com/dotnet/sdk:9.0 pwsh ``` -## Legal and Licensing - -PowerShell is licensed under the [MIT license][03]. +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][07] for a list of available tags. -### Windows Docker file and image licenses +- For more information about tags, the [Supported tag policy][06] +- For more information about supported operating systems, see the [Supported platforms policy][05] -By requesting and using the Container OS Image for Windows containers, you acknowledge, understand, -and consent to the Supplemental License Terms available on Docker hub: +## Support lifecycle -- [Window Server Core][06] -- [Nano Server][04] +Support for these images is governed by the [.NET support policy][03]. 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][04] repository +on GitHub. -### Telemetry +## Telemetry By default, PowerShell collects limited telemetry without personally identifiable information 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][07]. +[Microsoft Privacy Statement][08]. -[01]: https://docs.docker.com/engine/installation/ -[02]: https://github.com/PowerShell/PowerShell-Docker -[03]: https://github.com/PowerShell/PowerShell/tree/master/LICENSE.txt -[04]: https://mcr.microsoft.com/product/windows/nanoserver -[05]: https://mcr.microsoft.com/product/powershell -[06]: https://mcr.microsoft.com/product/windows/servercore -[07]: https://privacy.microsoft.com/privacystatement/ +[01]: /dotnet/architecture/microservices/net-core-net-framework-containers/official-net-docker-images +[02]: https://docs.docker.com/engine/installation/ +[03]: https://github.com/dotnet/core/blob/main/support.md +[04]: https://github.com/dotnet/dotnet-docker +[05]: https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-platforms.md +[06]: https://github.com/dotnet/dotnet-docker/blob/main/documentation/supported-tags.md +[07]: https://mcr.microsoft.com/en-us/artifact/mar/dotnet/sdk/about +[08]: https://privacy.microsoft.com/privacystatement/ From ecf134869912e7de550e099c11fe246a9336be4c Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Tue, 11 Mar 2025 12:53:04 -0500 Subject: [PATCH 2/3] Minor edit --- .../docs-conceptual/install/PowerShell-in-Docker.md | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/reference/docs-conceptual/install/PowerShell-in-Docker.md b/reference/docs-conceptual/install/PowerShell-in-Docker.md index 395ade70c9e7..1f3fec741c93 100644 --- a/reference/docs-conceptual/install/PowerShell-in-Docker.md +++ b/reference/docs-conceptual/install/PowerShell-in-Docker.md @@ -3,15 +3,15 @@ description: How to use PowerShell that's preinstalled in a Docker image. ms.date: 03/11/2025 ms.devlang: powershell ms.topic: conceptual -title: Using PowerShell in Docker +title: Use PowerShell in Docker --- -# Using PowerShell in Docker +# Use PowerShell in Docker The .NET team publishes Docker images with PowerShell preinstalled. This article shows you how to get started using PowerShell in the Docker container. -## Finding available images +## Find available images These images require Docker 17.05 or newer. It's also expected that you are able to run Docker without `sudo` or local administrative rights. Please follow Docker's official [instructions][02] to @@ -21,10 +21,7 @@ The .NET team publishes several Docker images designed for different development image for the .NET SDK contains PowerShell. For more information, see [Official .NET Docker images][01]. -## Using PowerShell in a container - -The following steps show the Docker commands required to download the image containing the latest -available stable version of PowerShell and start an interactive PowerShell session. +## Use PowerShell in a container The following command downloads the image containing the latest available stable versions of the .NET SDK and PowerShell. From 22c945036142863965456444003e14c4111dc995 Mon Sep 17 00:00:00 2001 From: Sean Wheeler Date: Thu, 20 Mar 2025 10:13:43 -0500 Subject: [PATCH 3/3] Acrolinx edits and minor clarifications --- .../install/PowerShell-in-Docker.md | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/reference/docs-conceptual/install/PowerShell-in-Docker.md b/reference/docs-conceptual/install/PowerShell-in-Docker.md index 1f3fec741c93..848f60e9a17f 100644 --- a/reference/docs-conceptual/install/PowerShell-in-Docker.md +++ b/reference/docs-conceptual/install/PowerShell-in-Docker.md @@ -1,5 +1,5 @@ --- -description: How to use PowerShell that's preinstalled in a Docker image. +description: How to use PowerShell in a Docker image. ms.date: 03/11/2025 ms.devlang: powershell ms.topic: conceptual @@ -13,11 +13,10 @@ get started using PowerShell in the Docker container. ## Find available images -These images require Docker 17.05 or newer. It's also expected that you are able to run Docker -without `sudo` or local administrative rights. Please follow Docker's official [instructions][02] to -install `docker` correctly. +These 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][02]. -The .NET team publishes several Docker images designed for different development scenarios. The +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][01]. @@ -47,18 +46,20 @@ system, you can specify the operating system in the image tag. See the ## Support lifecycle -Support for these images is governed by the [.NET support policy][03]. These images are provided for +The [.NET support policy][03] 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][04] repository on GitHub. +The images previously published by the PowerShell team will be marked as deprecated in the Microsoft +Container Registry (MCR). + ## Telemetry -By default, PowerShell collects limited telemetry without personally identifiable information 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][08]. +By 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][08]. [01]: /dotnet/architecture/microservices/net-core-net-framework-containers/official-net-docker-images