Skip to content

Commit c315bc5

Browse files
authored
Add Docker images that work with PSSA to ReadMe and give examples (#987)
* add working docker images with examples * Fix docker scripts (--it should have been -it and Windows/Linux command were the wrong way around)
1 parent 0e7cca6 commit c315bc5

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

README.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Table of Contents
1313
- [Usage](#usage)
1414
- [Installation](#installation)
1515
+ [From PowerShell Gallery](#from-powershell-gallery)
16-
- [Requirements](#requirements)
16+
- [Supported PowerShell Versions and Platforms](#supported-powerShell-versions-and-platforms)
1717
* [Windows](#windows)
1818
* [Linux (*Tested only on Ubuntu 14.04*)](#linux-tested-only-on-ubuntu-1404)
1919
+ [From Source](#from-source)
@@ -70,14 +70,19 @@ Install-Module -Name PSScriptAnalyzer
7070

7171
**Note**: For PowerShell version `5.1.14393.206` or newer, before installing PSScriptAnalyzer, please install the latest Nuget provider by running the following in an elevated PowerShell session.
7272
```powershell
73-
Install-PackageProvider Nuget –force –verbose
73+
Install-PackageProvider Nuget -MinimumVersion 2.8.5.201 –Force
7474
Exit
7575
```
7676

77-
#### Requirements
77+
#### Supported PowerShell Versions and Platforms
7878

7979
- Windows PowerShell 3.0 or greater
8080
- PowerShell Core on Windows/Linux/macOS
81+
- Docker (tested only using Docker CE on Windows 10 1803):
82+
- [microsoft/windowsservercore](https://hub.docker.com/r/microsoft/windowsservercore/) for Windows. Example:
83+
```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'"```
84+
- [microsoft/powershell](https://hub.docker.com/r/microsoft/powershell/) for Linux. Example:
85+
```docker run -it microsoft/powershell pwsh -c "Install-Module PSScriptAnalyzer -Force; Invoke-ScriptAnalyzer -ScriptDefinition 'gci'"```
8186

8287
### From Source
8388

0 commit comments

Comments
 (0)