|
20 | 20 | #}
|
21 | 21 |
|
22 | 22 | #{
|
23 |
| - # param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1") ) |
| 23 | + # param($DockerInstallPackages = @("git","curl","ca-certificates","libc6","libgcc1","build-essential", "python3", "nodejs") ) |
24 | 24 | # if ($DockerInstallPackages) {"RUN apt-get update && apt-get install -y $($dockerInstallPackages -join ' ')"}
|
25 | 25 | #}
|
26 | 26 |
|
27 |
| -ENV PSModulePath ./Modules |
| 27 | +#{ |
| 28 | + # $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1 |
| 29 | + # if ($LoadedModuleInPath) { "COPY ./ ./usr/local/share/powershell/Modules/$($LoadedModuleInPath | Split-Path -Leaf)" } |
| 30 | +#} |
28 | 31 |
|
29 | 32 | #{
|
30 | 33 | # param($DockerInstallModules = @("Splatter", "PSSVG", "ugit", "Irregular") )
|
31 | 34 | # $PowerShellPath = "opt/microsoft/powershell/7/pwsh"
|
32 |
| - # if ($DockerInstallModules) { "RUN $PowerShellPath --noprofile --nologo -c Install-Module '$($DockerInstallModules -join "','")' -Scope CurrentUser -Force"} |
33 |
| -#} |
34 |
| - |
35 |
| -#{ |
36 |
| - # $LoadedModuleInPath = (Get-Module | Split-Path) -match ([Regex]::Escape($pwd)) | Select -first 1 |
37 |
| - # if ($LoadedModuleInPath) { "COPY ./ ./Modules/$($LoadedModuleInPath | Split-Path -Leaf)" } |
| 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" } |
38 | 39 | #}
|
39 | 40 |
|
40 | 41 | #{
|
41 |
| - # param(<# A Script to Run When Docker Starts #>$DockerProfileScript = "./Http.Server.Start.ps1") |
42 |
| - # if ($DockerProfileScript) { "COPY ./$DockerProfileScript /root/.config/powershell/Microsoft.PowerShell_profile.ps1"} |
| 42 | + # 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'"}"} |
43 | 45 | #}
|
44 | 46 |
|
0 commit comments