Support offline creation of machine instance
- Dominant language
- Go
- Stars
- 21.9k
- Forks
- 957
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 53
Description
### Description
Currently the baseimage and the nerdctl-full can be cached, so that they don't have to be downloaded.
But then there are still some packages missing, which means that the machine needs Internet access.
It would be nice if there was a way to cache also these files, perhaps using something like [repro-get](https://github.com/reproducible-containers/repro-get) ?
So that one could start up an instance without external network, after making sure everything is cached.
-----
These are cached:
```
INFO[0001] Attempting to download the image from "https://cloud-images.ubuntu.com/releases/22.10/release-20230215/ubuntu-22.10-server-cloudimg-amd64.img" digest="sha256:5e5c68cb12002111032d3239ade3763ce25639f1287a59d2509a1603c2b1f7e6"
INFO[0001] Using cache "/home/anders/.cache/lima/download/by-url-sha256/7db6503d427a306824b1f62ce99d3a19a4c83f3b69af39022477aecca5c69b33/data"
INFO[0001] Attempting to download the nerdctl archive from "https://github.com/containerd/nerdctl/releases/download/v1.2.1/nerdctl-full-1.2.1-linux-amd64.tar.gz" digest="sha256:e8a3e40d442c566ee494375a4c563121da69d7c7837f50f4a3a171742757b36c"
INFO[0002] Using cache "/home/anders/.cache/lima/download/by-url-sha256/3ca338b148379fea1376fb450380cb21a2b26d8b1618da6eb1c5c5e352b03ea7/data"
```
```
~/.cache/lima/download/by-url-sha256
├── 3ca338b148379fea1376fb450380cb21a2b26d8b1618da6eb1c5c5e352b03ea7
│ ├── data
│ └── url
└── 7db6503d427a306824b1f62ce99d3a19a4c83f3b69af39022477aecca5c69b33
├── data
├── sha256.digest
└── url
```
But these are not:
```
[ 26.224771] cloud-init[2091]: + apt-get install -y --no-upgrade --no-install-recommends -q sshfs uidmap fuse3 dbus-user-session
[ 26.261518] cloud-init[2091]: Reading package lists...
[ 26.416159] cloud-init[2091]: Building dependency tree...
[ 26.417192] cloud-init[2091]: Reading state information...
[ 26.648233] cloud-init[2091]: Skipping fuse3, it is already installed and upgrade is not set.
[ 26.648657] cloud-init[2091]: fuse3 set to manually installed.
[ 26.648816] cloud-init[2091]: Skipping dbus-user-session, it is already installed and upgrade is not set.
[ 26.648940] cloud-init[2091]: dbus-user-session set to manually installed.
[ 26.649051] cloud-init[2091]: The following additional packages will be installed:
[ 26.651759] cloud-init[2091]: libsubid4
[ 26.673312] cloud-init[2091]: The following NEW packages will be installed:
[ 26.674092] cloud-init[2091]: libsubid4 sshfs uidmap
[ 27.802214] cloud-init[2091]: 0 upgraded, 3 newly installed, 0 to remove and 33 not upgraded.
[ 27.803518] cloud-init[2091]: Need to get 91.3 kB of archives.
[ 27.804323] cloud-init[2091]: After this operation, 438 kB of additional disk space will be used.
```
```
eb51492a6100940af250d65ad1c0d8f1fc9f9c645ebd4ad926da72ae3faf091a pool/main/s/shadow/libsubid4_4.11.1+dfsg1-2ubuntu1.1_amd64.deb
8986b00a1b6547f013c0e6ab159fbc7379554a95d4d5da4b8359857c52650b5d pool/universe/s/sshfs-fuse/sshfs_3.7.2-1_amd64.deb
217864fa6ae88b86af2179afa01c510021d51b61d5b16e3d3949dd4a4c4fd6f8 pool/main/s/shadow/uidmap_4.11.1+dfsg1-2ubuntu1.1_amd64.deb
```
Contributor guide
Assessment
This issue has not been assessed yet.