Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
StartAutomating authored and StartAutomating committed Apr 20, 2024
1 parent c8161cd commit 98138d6
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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 }"

0 comments on commit 98138d6

Please sign in to comment.