1
- FROM mcr.microsoft.com/powershell
2
-
3
1
# {
4
2
# <#
5
3
# .Synopsis
6
4
# Sample PipeScript Dockerfile Template
7
5
# .Description
8
6
# This is a working example DockerFile template that generates a dockerfile that runs PipeScript.
9
7
# #>
8
+ # param($BaseImage = 'mcr.microsoft.com/powershell')
9
+ # "FROM $BaseImage"
10
+ # }
11
+
12
+ # {
13
+
10
14
# param($EnvironmentVariables = [Ordered]@{PIPESCRIPT_VERSION=(Get-Module PipeScript).Version})
11
15
# if ($EnvironmentVariables) {
12
16
# foreach ($kvp in $environmentVariables.GetEnumerator()) {
@@ -15,25 +19,27 @@ FROM mcr.microsoft.com/powershell
15
19
# }
16
20
# }
17
21
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
- # }
27
22
ENV PSModulePath ./Modules
28
23
29
24
# {
30
- # param($DockerInstallModules = @()) # "Splatter", "PSSVG", "ugit"
25
+ # param($DockerInstallModules = @("Splatter", "PSSVG", "ugit") )
31
26
# $PowerShellPath = "opt/microsoft/powershell/7/pwsh"
32
27
# if ($DockerInstallModules) { "RUN $PowerShellPath --noprofile --nologo -c Install-Module '$($DockerInstallModules -join "','")' -Scope CurrentUser -Force"}
33
28
# }
34
29
35
30
# {
36
- # param($DockerInstallPackages = @()) # @( "git","curl","ca-certificates","libc6","libgcc1")
31
+ # param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1") )
37
32
# if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ')"}
38
33
# }
39
34
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