Skip to content

Commit

Permalink
update devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
potatoqualitee committed Oct 28, 2024
1 parent ded67ba commit ab38487
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@ RUN echo "export HISTFILE=/commandhistory/.bash_history" >> "/root/.bashrc" \
&& touch /commandhistory/.bash_history \
&& mkdir /workspace

SHELL ["/opt/microsoft/powershell/7/pwsh", "-c"]
RUN Set-PSRepository -Name PSGallery -InstallationPolicy Trusted

# Install Pester, has to be 4.4.3 because 4.4.2 has bug in Unix machines
SHELL ["/opt/microsoft/powershell/7/pwsh", "-c"]
RUN $ErrorActionPreference='Stop'; Install-Module -Name Pester -Force -SkipPublisherCheck -MaximumVersion 4.4.3;
# Set PSGallery as trusted and install Pester and PSScriptAnalyzer
RUN Set-PSRepository -Name PSGallery -InstallationPolicy Trusted; \
$ErrorActionPreference='Stop'; \
Install-Module -Name Pester, dbatools.library -Force -SkipPublisherCheck; \
Install-Module -Name Pester -Force -SkipPublisherCheck -MaximumVersion 4.4.3; \
Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck -MaximumVersion 1.18.2;

# Install PSScriptAnalyzer
SHELL ["/opt/microsoft/powershell/7/pwsh", "-c"]
RUN $ErrorActionPreference='Stop'; Install-Module -Name PSScriptAnalyzer -Force -SkipPublisherCheck -MaximumVersion 1.18.2;

# Git command prompt
# Change this if you want to utilize your fork
Expand Down

0 comments on commit ab38487

Please sign in to comment.