1- FROM mcr.microsoft.com/powershell
2-
31# {
42 # <#
53 # .Synopsis
64 # Sample PipeScript Dockerfile Template
75 # .Description
86 # This is a working example DockerFile template that generates a dockerfile that runs PipeScript.
97 # #>
8+ # param($BaseImage = 'mcr.microsoft.com/powershell')
9+ # "FROM $BaseImage"
10+ # }
11+
12+ # {
13+
1014 # param($EnvironmentVariables = [Ordered]@{PIPESCRIPT_VERSION=(Get-Module PipeScript).Version})
1115 # if ($EnvironmentVariables) {
1216 # foreach ($kvp in $environmentVariables.GetEnumerator()) {
@@ -15,25 +19,27 @@ FROM mcr.microsoft.com/powershell
1519 # }
1620# }
1721
18- # {
19- # $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1
20- # if ($LoadedModuleInPath) { "COPY ./ ./Modules/$($LoadedModuleInPath | Split-Path -Leaf)" }
21- # }
22-
23- # {
24- # param(<# A Script to Run When Docker Starts #>$DockerProfileScript = "./PipeScript.Server.Start.ps1")
25- # if ($DockerProfileScript) { "COPY ./$DockerProfileScript /root/.config/powershell/Microsoft.PowerShell_profile.ps1"}
26- # }
2722ENV PSModulePath ./Modules
2823
2924# {
30- # param($DockerInstallModules = @()) # "Splatter", "PSSVG", "ugit"
25+ # param($DockerInstallModules = @("Splatter", "PSSVG", "ugit") )
3126 # $PowerShellPath = "opt/microsoft/powershell/7/pwsh"
3227 # if ($DockerInstallModules) { "RUN $PowerShellPath --noprofile --nologo -c Install-Module '$($DockerInstallModules -join "','")' -Scope CurrentUser -Force"}
3328# }
3429
3530# {
36- # param($DockerInstallPackages = @()) # @( "git","curl","ca-certificates","libc6","libgcc1")
31+ # param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1") )
3732 # if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ')"}
3833# }
3934
35+
36+ # {
37+ # $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1
38+ # if ($LoadedModuleInPath) { "COPY ./ ./Modules/$($LoadedModuleInPath | Split-Path -Leaf)" }
39+ # }
40+
41+ # {
42+ # param(<# A Script to Run When Docker Starts #>$DockerProfileScript = "./PipeScript.Server.Start.ps1")
43+ # if ($DockerProfileScript) { "COPY ./$DockerProfileScript /root/.config/powershell/Microsoft.PowerShell_profile.ps1"}
44+ # }
45+
0 commit comments