Skip to content

Commit

Permalink
fix: ruby install finished and gem install fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpatigny authored Sep 4, 2024
1 parent 5e9536e commit 9ff902b
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 22 deletions.
22 changes: 11 additions & 11 deletions puppet/dockerfile6
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ ARG RUBY_VERSION=3.3.4-1
ARG PWSH_VERSION=7.4.5

RUN Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 ; \
$client = New-Object System.Net.WebClient ; \
$client = New-Object System.Net.WebClient ; \
$client.DownloadFile(\"https://downloads.puppetlabs.com/windows/puppet/pdk-$($env:PDK_VERSION)-x64.msi\",\"C:\temp\pdk-$($env:PDK_VERSION)-x64.msi\") ; \
$client.DownloadFile(\"https://downloads.puppetlabs.com/windows/puppet6/puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi\",\"C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi\") ; \
$client.DownloadFile(\"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-$($env:RUBY_VERSION)/rubyinstaller-$($env:RUBY_VERSION)-x64.exe\",\"C:\temp\rubyinstaller.exe\") ; \
$client.DownloadFile(\"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-$($env:RUBY_VERSION)/rubyinstaller-$($env:RUBY_VERSION)-x64.exe\",\"C:\temp\rubyinstaller.exe\") ; \
$client.DownloadFile(\"https://github.com/PowerShell/PowerShell/releases/download/v$($env:PWSH_VERSION)/PowerShell-$($env:PWSH_VERSION)-win-x64.msi\",\"C:\temp\pwsh.msi\") ; \
. C:\temp\helpers.ps1 ; \
Install-MSI "C:\temp\pwsh.msi" ; \
Install-MSI "C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi" ; \
Install-MSI "C:\temp\pdk-$($env:PDK_VERSION)-x64.msi" ; \
& C:\temp\rubyinstaller.exe /verysilent /currentuser ; \
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ; \
. C:\temp\helpers.ps1 ; \
Install-MSI "C:\temp\pwsh.msi" ; \
Install-MSI "C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi" ; \
Install-MSI "C:\temp\pdk-$($env:PDK_VERSION)-x64.msi" ; \
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ; \
Install-Module -Name Pester -Force -SkipPublisherCheck ; \
[System.Environment]::SetEnvironmentVariable('PDK_DISABLE_ANALYTICS', 'true', [EnvironmentVariableTarget]::Machine)

RUN gem install librarian-puppet -v 5.0.0 ; \
[System.Environment]::SetEnvironmentVariable('PDK_DISABLE_ANALYTICS', 'true', [EnvironmentVariableTarget]::Machine) ; \
Start-Process -FilePath C:\temp\rubyinstaller.exe -ArgumentList '/verysilent /currentuser' -Wait ; \
Remove-Item C:\temp -Force -Recurse

RUN gem install librarian-puppet -v 5.0.0

WORKDIR C:/puppet
CMD [ "pwsh.exe", "-NoLogo", "-NoProfileLoadTime" ]
22 changes: 11 additions & 11 deletions puppet/dockerfile8
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ ARG RUBY_VERSION=3.3.4-1
ARG PWSH_VERSION=7.4.5

RUN Set-ItemProperty 'HKLM:\System\CurrentControlSet\Control\FileSystem' -Name 'LongPathsEnabled' -Value 1 ; \
$client = New-Object System.Net.WebClient ; \
$client = New-Object System.Net.WebClient ; \
$client.DownloadFile(\"https://downloads.puppetlabs.com/windows/puppet/pdk-$($env:PDK_VERSION)-x64.msi\",\"C:\temp\pdk-$($env:PDK_VERSION)-x64.msi\") ; \
$client.DownloadFile(\"https://downloads.puppetlabs.com/windows/puppet8/puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi\",\"C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi\") ; \
$client.DownloadFile(\"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-$($env:RUBY_VERSION)/rubyinstaller-$($env:RUBY_VERSION)-x64.exe\",\"C:\temp\rubyinstaller.exe\") ; \
$client.DownloadFile(\"https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-$($env:RUBY_VERSION)/rubyinstaller-$($env:RUBY_VERSION)-x64.exe\",\"C:\temp\rubyinstaller.exe\") ; \
$client.DownloadFile(\"https://github.com/PowerShell/PowerShell/releases/download/v$($env:PWSH_VERSION)/PowerShell-$($env:PWSH_VERSION)-win-x64.msi\",\"C:\temp\pwsh.msi\") ; \
. C:\temp\helpers.ps1 ; \
Install-MSI "C:\temp\pwsh.msi" ; \
Install-MSI "C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi" ; \
Install-MSI "C:\temp\pdk-$($env:PDK_VERSION)-x64.msi" ; \
& C:\temp\rubyinstaller.exe /verysilent /currentuser ; \
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ; \
. C:\temp\helpers.ps1 ; \
Install-MSI "C:\temp\pwsh.msi" ; \
Install-MSI "C:\temp\puppet-agent-$($env:PUPPET_AGENT_VERSION)-x64.msi" ; \
Install-MSI "C:\temp\pdk-$($env:PDK_VERSION)-x64.msi" ; \
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force ; \
Install-Module -Name Pester -Force -SkipPublisherCheck ; \
[System.Environment]::SetEnvironmentVariable('PDK_DISABLE_ANALYTICS', 'true', [EnvironmentVariableTarget]::Machine)

RUN gem install librarian-puppet -v 5.0.0 ; \
[System.Environment]::SetEnvironmentVariable('PDK_DISABLE_ANALYTICS', 'true', [EnvironmentVariableTarget]::Machine) ; \
Start-Process -FilePath C:\temp\rubyinstaller.exe -ArgumentList '/verysilent /currentuser' -Wait ; \
Remove-Item C:\temp -Force -Recurse

RUN gem install librarian-puppet -v 5.0.0

WORKDIR C:/puppet
CMD [ "pwsh.exe", "-NoLogo", "-NoProfileLoadTime" ]

0 comments on commit 9ff902b

Please sign in to comment.