Skip to content

Commit

Permalink
fix: Updating PipeScript.ps.dockerfile ( re #662 )
Browse files Browse the repository at this point in the history
Using SHELL
  • Loading branch information
James Brundage committed May 7, 2024
1 parent 7e1b14a commit 0c1637f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions PipeScript.ps.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,28 @@

#{
# param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1","build-essential", "python3", "nodejs") )
# if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ')"}
# 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 = "opt/microsoft/powershell/7/pwsh"
# $InstallModules = "Install-Module '$($DockerInstallModules -join "','")' -Scope CurrentUser -Force"
# $NewProfile = "New-Item -ItemType File -Path \$Profile -Force"
# $AddInstalled = "Add-Content -Value 'Import-Module $(@(@($DockerInstallModules) + $LoadedModuleInPath)) -join "','")' -Path \$Profile"
# if ($DockerInstallModules) { "RUN $PowerShellPath --noprofile --nologo -c $InstallModules; $NewProfile | $AddInstalled" }
# $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 $PowerShellPath --noprofile --nologo -c 'Add-Content -Path \$Profile -Value ./$Microservice'"}"}
# if ($Microservice) { "COPY $Microservice $Microservice"}
# if ($Microservice) { "RUN Add-Content -Path \`$Profile -Value $Microservice" }
#}

0 comments on commit 0c1637f

Please sign in to comment.