Skip to content

Commit

Permalink
feat: 4bitcss Docker - Installing PSSVG ( re #50 )
Browse files Browse the repository at this point in the history
  • Loading branch information
James Brundage committed Apr 22, 2024
1 parent a895e66 commit 497c496
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Thank you Microsoft! Thank you PowerShell! Thank you Docker!
FROM mcr.microsoft.com/powershell

# Set the module name to the name of the module we are building
Expand All @@ -6,4 +7,13 @@ ARG ModuleName=4bitcss
COPY . ./usr/local/share/powershell/Modules/$ModuleName
# Create a profile that imports the module, so it is available when the container starts.
RUN pwsh -c "New-Item -Path \$Profile -ItemType File -Force | Out-Null"
# Add the module to the profile
RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module $ModuleName' -Force"

# InstallModules determines additional modules to install
ARG InstallModules=PipeScript,PSSVG,ugit

# Install additional modules
RUN pwsh -c "Install-Module -Name $InstallModules -Force -AcceptLicense -Scope CurrentUser"
# Add the modules to the profile
RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module $InstallModules' -Force"

0 comments on commit 497c496

Please sign in to comment.