-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathPipeScript.ps.dockerfile
More file actions
49 lines (41 loc) · 2.04 KB
/
PipeScript.ps.dockerfile
File metadata and controls
49 lines (41 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#{
# <#
# .Synopsis
# Sample PipeScript Dockerfile Template
# .Description
# This is a working example DockerFile template that generates a dockerfile that runs PipeScript.
# #>
# param($BaseImage = 'mcr.microsoft.com/powershell')
# "FROM $BaseImage"
#}
#{
# param($EnvironmentVariables = [Ordered]@{PIPESCRIPT_VERSION=(Get-Module PipeScript).Version})
# if ($EnvironmentVariables) {
# foreach ($kvp in $environmentVariables.GetEnumerator()) {
# "ENV $($kvp.Key) $($kvp.Value)"
# }
# }
#}
#{
# param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1","liblttng-ust1","libstdc++6","libunwind8","zlib1g","build-essential", "libgdiplus", "golang","python3", "nodejs","dotnet-sdk-8.0") )
# if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ') && apt-get clean"}
#}
#{
# $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1
# if ($LoadedModuleInPath) { "COPY ./ ./usr/local/share/powershell/Modules/$($LoadedModuleInPath | Split-Path -Leaf)" }
#}
SHELL ["pwsh", "-noprofile", "-nologo", "-command"]
#{
# param($DockerInstallModules = @("Splatter", "PSSVG", "ugit", "Irregular") )
# $PowerShellPath = "/bin/pwsh"
# $InstallModules = "Install-Module '$($DockerInstallModules -join "','")' -AcceptLicense -Scope CurrentUser -Force"
# $NewProfile = "New-Item -ItemType File -Path `$Profile -Force"
# $AddInstalled = "Add-Content -Value `"Import-Module '$(@($DockerInstallModules + $($LoadedModuleInPath | Split-Path -Leaf)) -join "','")'`""
# if ($DockerInstallModules) { "RUN @($InstallModules && $NewProfile | $AddInstalled)" -replace '\$', '\$' }
#}
#{
# param(<# A Script to Run When Docker Starts #>$Microservice = "./Http.Server.Start.ps1")
# if ($Microservice) { "COPY $Microservice $Microservice"}
# if ($Microservice) { "RUN Add-Content -Path \`$Profile -Value $Microservice" }
#}
ENTRYPOINT ["pwsh","-nologo"]