diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..db12bd5 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +# Thank you Microsoft! This is a great way to get a PowerShell environment up and running quickly. +FROM mcr.microsoft.com/powershell +# Set the module name to the name of the module we are building +ARG ModuleName=Posh +# Copy the module into the container +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" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module $ModuleName' -Force" + +# For This Module Only, we install all of the recommended modules. +# and add them to the profile so they are available when the container starts. + + +RUN pwsh -c "Install-Module -Name 'EZOut' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module EZOut' -Force }" +RUN pwsh -c "Install-Module -Name 'PipeScript' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module PipeScript' -Force }" +RUN pwsh -c "Install-Module -Name 'HelpOut' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module HelpOut' -Force }" +RUN pwsh -c "Install-Module -Name 'PSSVG' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module PSSVG' -Force }" +RUN pwsh -c "Install-Module -Name 'Splatter' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module Splatter' -Force }" +RUN pwsh -c "Install-Module -Name 'ShowDemo' -Force -AllowClobber -Scope CurrentUser -PassThru" +RUN pwsh -c "Add-Content -Path \$Profile -Value 'Import-Module ShowDemo' -Force }"