chocolatey-community / chocolatey-oneget

OneGet Provider for Chocolatey
Apache License 2.0
61 stars 18 forks source link

Offline install? #15

Open dtrac opened 7 years ago

dtrac commented 7 years ago

Hello there - is there a way of installing the chocolatey package provider from a local software repo? I'll be installing (and using) the provider behind a strict firewall.

Looking at the PackageProvider object in PowerShell (and via Windows Explorer) - it seems to be encapsulated in a single executable...?

Thanks,

Dan

ferventcoder commented 7 years ago

The choco.exe client supports it, but I don't know that OneGet supports it. I know @gaelcolas may be working on something on this

gaelcolas commented 7 years ago

The recommended way here is to Install Choco.exe and the PowerShell provider named ChocolateyGet. As @ferventcoder mentioned, Choco.exe supports that type of install (i.e. use the install.ps1 and point it to your local/internal Chocolatey.nupkg by setting $env:chocolateyDownloadUrl).

Then you can download and install the ChocolateyGet module from an Internal repo. The catch, is that on a clean system, you won't have the binaries required to download the module via nuGet (used by Install-Module)... so you'd need to bootstrap your NuGet provider first (which requires Internet access, or copying the required files on the system from a bootstrapped. instruction here).

That's what I'm working on, is a DSC resource that packages all of those things up, so that it does not have dependencies on Internet connection, or internal feed with packages pre installed. Not released yet tho (and I'm not even 100% sure I can yet, because redistribution)...