Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add microsoft/powershell:NanoServer example and simplify all docker e…
…xamples to use the microsoft/powershell image tags
  • Loading branch information
bergmeister committed May 7, 2018
commit 6b8ccd5bbec5d94d3091a9c6244c8009cad85094
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,16 @@ Exit

- Windows PowerShell 3.0 or greater
- PowerShell Core on Windows/Linux/macOS
- Docker (tested only using Docker CE on Windows 10 1803):
- [microsoft/windowsservercore](https://hub.docker.com/r/microsoft/windowsservercore/) for Windows. Example:
```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'"```
- [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/) for Linux. Example:
```docker run -it microsoft/powershell pwsh -c "Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
- Docker image tags from [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/) (tested only using Docker CE on Windows 10 1803):
- Windows NanoServer (note that the [microsoft/nanoserver](https://hub.docker.com/r/microsoft/windowsservercore/) image does not work because it contains version 5.1 of PowerShell Core) - Example:

```docker run -it microsoft/powershell:nanoserver pwsh -command "Save-Module -Name PSScriptAnalyzer -Path .; Import-Module C:\PSScriptAnalyzer; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
- Windows Server Core (note that the [microsoft/windowsservercore](https://hub.docker.com/r/microsoft/windowsservercore/) image works alternatively as well) - Example:

```docker run -it microsoft/powershell:nanoserver pwsh -command "Save-Module -Name PSScriptAnalyzer -Path .; Import-Module C:\PSScriptAnalyzer; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
- Linux - Example:

```docker run -it microsoft/powershell pwsh -c "Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```

### From Source

Expand Down