azure-powershell-1/docker
Damien Caro 1eb233c35b
Removed host authentication (#17412)
2022-03-10 16:03:12 +08:00
..
config get Az version for docker from tools\Az\Az.psd1 2020-02-12 15:17:25 +08:00
Dockerfile-alpine-3.13 Upgrade base image of alpine (#16213) 2021-10-26 15:04:06 +08:00
Dockerfile-alpine-3.14 Add dockerfile for ubuntu 20.04 and alpine 3.14 (#17063) 2022-02-10 17:30:15 +08:00
Dockerfile-centos-7 Add -Scope AllUsers to docker images (#12995) 2020-09-21 10:21:03 +08:00
Dockerfile-debian-9 Add -Scope AllUsers to docker images (#12995) 2020-09-21 10:21:03 +08:00
Dockerfile-ubuntu-18.04 Add -Scope AllUsers to docker images (#12995) 2020-09-21 10:21:03 +08:00
Dockerfile-ubuntu-20.04 Add dockerfile for ubuntu 20.04 and alpine 3.14 (#17063) 2022-02-10 17:30:15 +08:00
README.md Removed host authentication (#17412) 2022-03-10 16:03:12 +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.