core: make cache directory configurable#1537
Conversation
|
@abiosoft side note: I noticed that the FAQ page in the docs and the |
|
The cache directory is actually a special case as it is always mounted in the VM, downloaded artifacts needed in the VM are retrieved via the mounted cache directory. Therefore, locating it on external disk would remove the guarantee of it always being mounted. Further updates are needed in that regard before this PR can be merged. As for the FAQ, yeah, the website is more detailed. I plan to eventually get rid of the FAQ.md file and direct users to the website instead. |
|
FYI, you can clear the cache (to save disk space) with |
|
@reillylm you can do a rebase and we should be good to go 👍🏽 |
I routinely run out of space on my Macbook's 256GB drive. I have `COLIMA_HOME` set on an external drive to hold the Lima disks, but it would be nice to have the cache directory there too. I wasn't sure if we wanted to require the directory already exist (as we do with `$COLIMA_HOME`) or create the directory automatically (as we do with `$LIMA_HOME`), so I picked the latter (otherwise, it'll fall back silently to the default, which feels wrong if we're explicitly setting the env var). Noted the new env var down in the FAQ file. Also moved where we talk about the env vars from abiosoft#1522, since I thought it was a little confusing how it was written. Specifically, `COLIMA_HOME` / `COLIMA_PROFILE` / `DOCKER_CONFIG` are env vars for the host to configure the Colima CLI (or Docker CLI), whereas `--env` is used to inject env vars into the guest VM, so I tried to make that more clear. Signed-off-by: reillylm <reillylm@users.noreply.github.com>
d41e258 to
9ec54d1
Compare
|
Hmm interesting, I thought the cache directory was only used when creating a VM the first time to download the disk image? |
It was used for more than that. |
|
Thanks :) |
I routinely run out of space on my Macbook's 256GB drive. I have
COLIMA_HOMEset on an external drive to hold the Lima disks, but it would be nice to have the cache directory there too.I wasn't sure if we wanted to require the directory already exist (as we do with
$COLIMA_HOME) or create the directory automatically (as we do with$LIMA_HOME), so I picked the latter (otherwise, it'll fall back silently to the default, which feels wrong if we're explicitly setting the env var).Noted the new env var down in the FAQ file. Also moved where we talk about the env vars from #1522, since I thought it was a little confusing how it was written. Specifically,
COLIMA_HOME/COLIMA_PROFILE/DOCKER_CONFIGare env vars for the host to configure the Colima CLI (or Docker CLI), whereas--envis used to inject env vars into the guest VM, so I tried to make that more clear.