Skip to content

Commit 0c1637f

Browse files
author
James Brundage
committed
fix: Updating PipeScript.ps.dockerfile ( re #662 )
Using SHELL
1 parent 7e1b14a commit 0c1637f

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

PipeScript.ps.dockerfile

+10-8
Original file line numberDiff line numberDiff line change
@@ -21,26 +21,28 @@
2121

2222
#{
2323
# param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1","build-essential", "python3", "nodejs") )
24-
# if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ')"}
24+
# if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ') && apt-get clean"}
2525
#}
2626

2727
#{
2828
# $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1
2929
# if ($LoadedModuleInPath) { "COPY ./ ./usr/local/share/powershell/Modules/$($LoadedModuleInPath | Split-Path -Leaf)" }
3030
#}
3131

32+
SHELL ["pwsh", "-noprofile", "-nologo", "-command"]
33+
3234
#{
3335
# param($DockerInstallModules = @("Splatter", "PSSVG", "ugit", "Irregular") )
34-
# $PowerShellPath = "opt/microsoft/powershell/7/pwsh"
35-
# $InstallModules = "Install-Module '$($DockerInstallModules -join "','")' -Scope CurrentUser -Force"
36-
# $NewProfile = "New-Item -ItemType File -Path \$Profile -Force"
37-
# $AddInstalled = "Add-Content -Value 'Import-Module $(@(@($DockerInstallModules) + $LoadedModuleInPath)) -join "','")' -Path \$Profile"
38-
# if ($DockerInstallModules) { "RUN $PowerShellPath --noprofile --nologo -c $InstallModules; $NewProfile | $AddInstalled" }
36+
# $PowerShellPath = "/bin/pwsh"
37+
# $InstallModules = "Install-Module '$($DockerInstallModules -join "','")' -AcceptLicense -Scope CurrentUser -Force"
38+
# $NewProfile = "New-Item -ItemType File -Path `$Profile -Force"
39+
# $AddInstalled = "Add-Content -Value 'Import-Module $(@($DockerInstallModules + $($LoadedModuleInPath | Split-Path -Leaf)) -join "','")'"
40+
# if ($DockerInstallModules) { "RUN @($InstallModules && $NewProfile | $AddInstalled)" -replace '\$', '\$' }
3941
#}
4042

4143
#{
4244
# param(<# A Script to Run When Docker Starts #>$Microservice = "./Http.Server.Start.ps1")
43-
# if ($Microservice) { "COPY ./$Microservice ./$Microservice"}
44-
# if ($Microservice) { "RUN $PowerShellPath --noprofile --nologo -c 'Add-Content -Path \$Profile -Value ./$Microservice'"}"}
45+
# if ($Microservice) { "COPY $Microservice $Microservice"}
46+
# if ($Microservice) { "RUN Add-Content -Path \`$Profile -Value $Microservice" }
4547
#}
4648

0 commit comments

Comments
 (0)