azure-powershell/docker
NanxiangLiu ce0d68b535
remove alpine 3.16 from docker image (#25848)
2024-08-19 15:02:15 +08:00
..
config get Az version for docker from tools\Az\Az.psd1 2020-02-12 15:17:25 +08:00
Dockerfile-alpine-3.17 Update docker files to align with those from PowerShell (#23158) 2023-11-05 18:25:12 +08:00
Dockerfile-debian-11 fix issue with installmodule script (#22055) 2023-06-15 17:12:44 +08:00
Dockerfile-debian-12 Update docker files to align with those from PowerShell (#23158) 2023-11-05 18:25:12 +08:00
Dockerfile-mariner-2 fix issue with installmodule script (#22055) 2023-06-15 17:12:44 +08:00
Dockerfile-mariner-2-arm64 Update docker files to align with those from PowerShell (#23158) 2023-11-05 18:25:12 +08:00
Dockerfile-ubi-8 Update docker files to align with those from PowerShell (#23158) 2023-11-05 18:25:12 +08:00
Dockerfile-ubi-9 Update docker files to align with those from PowerShell (#23158) 2023-11-05 18:25:12 +08:00
Dockerfile-ubuntu-20.04 fix issue with installmodule script (#22055) 2023-06-15 17:12:44 +08:00
Dockerfile-ubuntu-22.04 fix issue with installmodule script (#22055) 2023-06-15 17:12:44 +08:00
README.md [main-doc]changed domian name. (#21016) 2023-02-28 13:26:31 +08:00

README.md

Docker

Overview

These Dockerfiles enable executing Azure-PowerShell cmdlets in a container for the supported OS.

Configuration

This image requires Docker 17.05 or newer.

It is also expected that you are able to run Docker without sudo. Please follow Docker's official instructions to install docker correctly.

Release

The release containers derive from the Powershell image, and then install the current Az package. Starting with Az 3.6.1 the images are using PowerShell 7, the previous versions are using PowerShell 6.2.4.

Azure PowerShell release notes

Examples

Download/Update the azure-powershell image

docker pull mcr.microsoft.com/azure-powershell

Run azure-powershell container

  • To run azure-powershell using a container in an interactive mode:
$ docker run -it mcr.microsoft.com/azure-powershell pwsh 

Building image

Clone the azure-powershell repo, and in your local copy run the following commands:

$ dotnet msbuild /t:Build /p:Configuration=Release
$ dotnet msbuild /t:publish /p:Configuration=Release /p:NuGetKey=1234
$ dotnet msbuild /t:BuildImage /p:DockerImageName=mcr.microsoft.com/azure-powershell
$ docker images

Remove image

docker rmi mcr.microsoft.com/azure-powershell

Developing and Contributing

Please see the Contribution Guide for general information about how to develop and contribute.

If you have any problems, please consult the GitHub issues. If you do not see your problem captured, please file a new issue and follow the provided template.

Azure-PowerShell is licensed under the Apache license.

PowerShell is licensed under the MIT license.

[Code of Conduct][conduct-md]

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.