From c5a86784db1031a1213627f4473bc14910ecc5df Mon Sep 17 00:00:00 2001 From: Brett Anspach Date: Sun, 15 May 2022 21:28:06 -0500 Subject: [PATCH] INF-2341 Add step to install PSScriptAnalyzer module --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index fb46a88..1fb9a56 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,10 @@ RUN wget -O powershell.tar.gz https://github.com/PowerShell/PowerShell/releases/ chmod +x /opt/microsoft/powershell/7/pwsh; \ ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +# Install PSScriptAnalyzer +RUN /usr/bin/pwsh -Command { Set-PSRepository PSGallery -InstallationPolicy Trusted; \ + Install-Module PSScriptAnalyzer -ErrorAction Stop } + COPY entrypoint.sh /entrypoint.sh RUN chmod +x /entrypoint.sh ENTRYPOINT ["/entrypoint.sh"]