From 497c49637d42522eb2e82dbe033a712c03e3b3be Mon Sep 17 00:00:00 2001 From: James Brundage <@github.com> Date: Sun, 21 Apr 2024 22:28:07 -0700 Subject: [PATCH] feat: 4bitcss Docker - Installing PSSVG ( re #50 ) --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index d2876c2358..7d0b21ae5d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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"