2
2
3
3
4
4
## Overview
5
- This Dockerfile enable running Azure-PowerShell in a container for OS we support.
6
-
5
+ These Dockerfiles enable executing Azure-PowerShell cmdlets in a container for the supported OS.
7
6
8
7
## Configuration
9
- This requires Docker 17.05 or newer.
10
- It also expects you to be able to run Docker without ` sudo ` .
8
+ This image requires Docker 17.05 or newer.
9
+
10
+ It is also expected that you are able to run Docker without ` sudo ` .
11
11
Please follow [ Docker's official instructions] [ install ] to install ` docker ` correctly.
12
12
13
13
[ install ] : https://docs.docker.com/engine/installation/
14
14
15
15
16
16
## Release
17
17
18
- The release containers derive from the [ Powershell image] [ powershell image ] , and then install the Az package.
18
+ The release containers derive from the [ Powershell image] [ powershell image ] , and then install the current Az package.
19
19
20
20
[ powershell image ] : https://hub.docker.com/_/microsoft-powershell
21
21
22
- TODO: link to azure-powershell release page
23
-
22
+ Azure PowerShell [ release notes] ( https://docs.microsoft.com/en-us/powershell/azure/release-notes-azureps )
24
23
25
24
## Examples
26
25
27
- ### Download/Update image
26
+ ### Download/Update the azure-powershell image
28
27
29
28
``` sh
30
- docker pull mcr.microsoft.com/azureps/ azure-powershell
29
+ docker pull mcr.microsoft.com/azure-powershell
31
30
```
32
31
33
32
### Run azure-powershell container
34
33
35
- To run azure-powerShell from using a container in an interactive mode:
34
+ - To run azure-powershell using a container in an interactive mode:
36
35
37
36
``` sh
38
37
$ docker run -it mcr.microsoft.com/azureps/azure-powershell pwsh
39
38
```
40
- To run azure-powerShell from using a container in an interactive mode using host authentication,
41
- you need to make sure "~ /.Azure" is existed (which is the default location) and you might need to grant docker to access this location:
39
+
40
+ - To run azure-powershell from using a container in an interactive mode using host authentication:
41
+
42
+ 1- Make sure that ` $HOME/.Azure ` is present on the host (default location)
43
+ 2- You may need to grant access this location for the docker process.
42
44
43
45
``` sh
44
46
$ docker run -it -v ~ /.Azure/AzureRmContext.json:/root/.Azure/AzureRmContext.json -v ~ /.Azure/TokenCache.dat:/root/.Azure/TokenCache.dat mcr.microsoft.com/azureps/azure-powershell pwsh
45
47
```
46
- To check host authentication:
48
+
49
+ Verify the host authentication:
47
50
48
51
``` sh
49
52
docker run -it --rm -v ~ /.Azure/AzureRmContext.json:/root/.Azure/AzureRmContext.json -v ~ /.Azure/TokenCache.dat:/root/.Azure/TokenCache.dat mcr.microsoft.com/azureps/azure-powershell pwsh -c Get-AzContext
50
53
```
51
54
52
55
### Building image
53
56
54
- In your local copy of azure-powershell repo, run:
57
+ Clone the azure-powershell repo, and in your local copy run the following commands :
55
58
56
59
``` sh
57
60
$ dotnet msbuild /t:Build /p:Configuration=Release
@@ -67,7 +70,6 @@ $ docker images
67
70
docker rmi mcr.microsoft.com/azureps/azure-powershell
68
71
```
69
72
70
-
71
73
## Developing and Contributing
72
74
73
75
Please see the [ Contribution Guide] [ ] for general information about how to develop and contribute.
@@ -77,7 +79,7 @@ If you do not see your problem captured, please file a [new issue][] and follow
77
79
78
80
[ Contribution Guide ] : https://github.com/Azure/azure-powershell/blob/master/CONTRIBUTING.md
79
81
[ GitHub issues ] : https://github.com/Azure/azure-powershell/issues
80
- [ new issue ] :https://github.com/Azure/azure-powershell/issues/new
82
+ [ new issue ] :https://aka.ms/azpsissue
81
83
82
84
83
85
## Legal and Licensing
@@ -87,6 +89,10 @@ Azure-PowerShell is licensed under the [MIT license][].
87
89
[ MIT license ] : https://github.com/Azure/azure-powershell/blob/master/LICENSE.txt
88
90
89
91
92
+ PowerShell is licensed under the [ MIT license] [ ] .
93
+
94
+ [ MIT license ] : https://github.com/PowerShell/PowerShell/tree/master/LICENSE.txt
95
+
90
96
## [ Code of Conduct] [ conduct-md ]
91
97
92
98
This project has adopted the [ Microsoft Open Source Code of Conduct] [ conduct-code ] .
0 commit comments