How to install Chocolatey packages entirely from "local" resources?

I am trying to install a chocolate bag from a local one. Since I want to be able to store all the "artifacts" on disk and go to PC and just type

choco install <pkgname> -s D:\External\choco-repo 

I noticed that

 choco search <pkgname> -s D:\External\choco-repo 

works, however, when I install it, it still pulls artifacts from the http feed. Is there a way to use local storage or a network drive to complete installations?

Please note that I made a copy of the contents of C: \ ProgramData \ chocolatey \ lib in D: \ External \ choco-repo.

+5
source share
1 answer

Almost all Chocolatey Packages are just a wrapper around what you “do” if you need to complete the manaully installation. This includes downloading the necessary files from the Internet. If you look at the contents of the Chocolatey Package, you will see the required URL for downloading exe, msi, zip, files necessary for installation. Application installers are usually NOT contained in the Chocolatey package. This is due to distribution restrictions.

Having said that Chocolatey downloads the necessary files to a known place on the hard drive, and at the time of writing, if you try to install the same package, the downloaded version of the installer with the cache will be used, however this method is not guaranteed or supported.

Instead, the best bet in terms of your own maintainability would be to change the Chocolatey packages you want to use and instruct them to use the installer that you put inside somewhere.

Go ahead, the offline installation history with Chocolatey will improve, but now there is still some manual work that you have to do.

+6
source

Source: https://habr.com/ru/post/1242153/


All Articles