Skip to content

Commit b99ceb2

Browse files
bergmeisterJamesWTruher
authored andcommitted
Add NanoServer Docker example and summarize all docker examples better (#990)
* Add microsoft/powershell:NanoServer example and simplify all docker examples to use the microsoft/powershell image tags * summarise and unify
1 parent 9e38cdb commit b99ceb2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,16 @@ Exit
7676

7777
- Windows PowerShell 3.0 or greater
7878
- PowerShell Core on Windows/Linux/macOS
79-
- Docker (tested only using Docker CE on Windows 10 1803):
80-
- [microsoft/windowsservercore](https://hub.docker.com/r/microsoft/windowsservercore/) for Windows. Example:
81-
```docker run -it microsoft/windowsservercore powershell -command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
82-
- [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/) for Linux. Example:
83-
```docker run -it microsoft/powershell pwsh -c "Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
79+
- Docker (tested only using Docker CE on Windows 10 1803
80+
- PowerShell 6 Windows Image tags using from [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/): `nanoserver`, `6.0.2-nanoserver`, `6.0.2-nanoserver-1709`, `windowsservercore` and `6.0.2-windowsservercore`. Example (1 warning gets produced by `Save-Module` but can be ignored):
81+
82+
```docker run -it microsoft/powershell:nanoserver pwsh -command "Save-Module -Name PSScriptAnalyzer -Path .; Import-Module .\PSScriptAnalyzer; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
83+
- PowerShell 5.1 (Windows): Only the [microsoft/windowsservercore](https://hub.docker.com/r/microsoft/windowsservercore/) images work but not the [microsoft/nanoserver](https://hub.docker.com/r/microsoft/windowsservercore/) images because they contain a Core version of it. Example:
84+
85+
```docker run -it microsoft/windowsservercore powershell -command "Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
86+
- Linux tags from [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/): `latest`, `ubuntu16.04`, `ubuntu14.04` and `centos7`. - Example:
87+
88+
```docker run -it microsoft/powershell:latest pwsh -c "Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
8489

8590
### From Source
8691

0 commit comments

Comments
 (0)