We publish Docker images with Azure PowerShell preinstalled. You can use Docker to run a standalone
Linux container with Azure PowerShell preinstalled. This article shows you how to use Azure
PowerShell in the Docker container.
Finding available images
The released images require Docker 17.05 or newer. You must be able to run Docker without sudo or
local administrative rights. Follow Docker's official instructions to install Docker.
The release containers derive from the official distribution image, install dependencies, and
install the Azure PowerShell module.
The latest container image contains the latest version of PowerShell and the latest Azure PowerShell
modules supported with the Az PowerShell module.
You can find a complete list of Azure PowerShell Docker images on our Docker image page.
Using Azure PowerShell in a container
The following steps show the Docker commands required to download the image and start an interactive
PowerShell session.
Run the azure-powershell container in interactive mode:
docker run -it mcr.microsoft.com/azure-powershell:mariner-2-arm64 pwsh
For Windows Docker hosts, you must enable Docker file sharing to allow local drives on Windows to be
shared with Linux containers. For more information, see
Get started with Docker for Windows.
Remove the image when no longer needed
The following command deletes the Docker container when you no longer need it.
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: