I am trying to install a Chocolatey package from local. Since I want to be able to store all the "artifacts" in a disk and go to a PC and just type
choco install <pkgname> -s D:\External\choco-repo
I noticed that the
choco search <pkgname> -s D:\External\choco-repo
works, however when I install it, it still pulls the artifacts from the HTTP feed. Is there a way to just use local storage or a network drive to perform installations?
Note that what I did was copy the contents of C:\ProgramData\chocolatey\lib
to D:\External\choco-repo
.
This includes downloading the required files from the Internet. If you look at the contents of the Chocolatey package, you will see the required URLs to download the EXE, MSI, and ZIP files required to do the install. The application installers are typically NOT contained within the Chocolatey package. This is due to distribution limitations.
Chocolatey is extremely powerful on its own, but having the ability to generate your own internal packages puts Chocolatey on a whole new level. Join the 4sysops PowerShell group!
To easily inspect our .nupkg, we can use the NuGet Package Explorer, which we can install using Chocolatey: After installing this, you can open the generated nupkg files using the Package Explorer to see their contents.
The application installers are typically NOT contained within the Chocolatey package. This is due to distribution limitations.
Almost all Chocolatey packages are simply a wrapper around what you "would do" if you were to do the installation manually. This includes downloading the required files from the Internet.
If you look at the contents of the Chocolatey package, you will see the required URLs to download the EXE, MSI, and ZIP files required to do the install. The application installers are typically NOT contained within the Chocolatey package. This is due to distribution limitations.
Having said that, Chocolatey does download the required files to a known location on the hard drive, and as of the time of writing, if an installation of the same package is attempted, the cached downloaded version of the installer will be used, however, this technique is not guaranteed, or supported.
Instead, the best bet, in terms of your own maintainability, would be to modify the Chocolatey packages that you want to use, and instruct them to use the installer which you host internally, somewhere.
Going forward, the offline installation story with Chocolatey is planned to get better, but right now, there is still some manual work that you have to do.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With