I am currently working in a very restricted environment. Therefore I can't download the Alpine images from the internet. Actually I could, but the proxy of the enterprise I am working for has problems to handle large files. Furthermore it would be more efficient to download the files from a local storage.
The file .lima/colima/lima.yaml
contains the following section with the specification of the image locations:
images:
- location: https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.4.2-1/alpine-lima-clm-3.14.6-aarch64.iso
arch: aarch64
digest: sha512:8e05be487fb6c3cf45f6378ca667f2f175c4fb07f162458ff9254f5ef4290ea94f176a6f2f9f854ab60f9668865e4d9bf0d9b24f0bb88dca4e30596855cc4013
- location: https://github.com/abiosoft/alpine-lima/releases/download/colima-v0.4.2-1/alpine-lima-clm-3.14.6-x86_64.iso
arch: x86_64
digest: sha512:229121f3ff3cb645a602e3f21d687207ad14c48330001330430c84e88fb0311a70b4a94250c2e24e80e8d3522ee573e169fef76337214136d1dde9bbc4ec1354
Everytime I edit this section manually, it is overwritten by my next attempt to run colima.
Is it possible to upload the images to a local storage server, e.g. a raw repository provided by Nexus, and to replace the URLs above by the local ones at all?
The first step is to store store the needed images somewhere. It might be a artifact repository like Nexus or Artifactory, or, according to the developers of the underlying Lima VM, even a filesystem.
To tell colima to use your local copy of the ISO images, you must run colima onces.
> colima start
As written above, if the images can't be downloaded, colima will fail to start. But it created a so calledn context in the configuration of the Lima VM. The next step is to edit this context by entering the command:
> limactl edit colima
This spawns an editor with the configuration, there you also can change the location of the images.
After exiting the editor and saving the configuration, you can start colima again with colima start
and the images will be downloaded from the specified location.
This solution was written for colima 0.4.4 and Lima VM 0.11.2.
The developers behind colima will see, if there will be a better solution for such cases to change the locaton of the images.