Open
Description
Description
Hi. I'd like a feature to allow local repo directories in containerd archives in Lima yaml. This can make a smooth experience of developing nerdctl/containerd/buildkit/others in macOS locally without using remote IDE.
Lima yaml only accepts full nerdctl tar.gz today (I found it untars the tar.gz file here so assumed it. Correct me if I missed anything). Although developers can write scripts to build the tar.gz as workaround, directly filling local repo directories can make the experience better.
Example yaml to help explain the idea. The exact interface is still TBD.
# Override containerd archive
# 🟢 Builtin default: hard-coded URL with hard-coded digest (see the output of `limactl info | jq .defaultTemplate.containerd.archives`)
archives:
- location: "~/Downloads/nerdctl-full-X.Y.Z-linux-amd64.tar.gz"
arch: "x86_64"
digest: "sha256:..."
local_repo_directories:
- arch: "x86_64"
nerdctl_directory: "~/workspace/nerdctl"
containerd_directory: "~/workspace/containerd"
buildkit_directory: "~/workspace/buildkit"
- Will raise error if both archives and local_repo_directories are filled to prevent conflict (Alternative is one can override the other)
- No need to check digest in local_repo_directories
- If the directory of any dependency is empty in yaml, it will use the lima default one.
User story:
As a macOS developer, if I want to test my nerdctl changes locally, I can follow these steps:
- cd ~/workspace
- git clone github.com/containerd/nerdctl
- cd nerdctl and make changes
- Run
lima start
with the yaml like this
local_repo_directories:
- arch: "x86_64"
nerdctl_directory: "~/workspace/nerdctl"
- Run
lima nerdctl ...
to test my change
As a macOS developer, if I want to test my containerd changes locally, I can follow these steps:
- cd ~/workspace
- git clone github.com/containerd/containerd
- cd containerd and make changes
- Run
lima start
with the yaml like this
local_repo_directories:
- arch: "x86_64"
containerd_directory: "~/workspace/containerd"
- Use
lima nerdctl ...
or log in lima shell to test in other ways with containerd socket
As a macOS developer, if I want to test a large feature that includes the features in both containerd and nerdctl locally, I can follow these steps:
- cd ~/workspace
- git clone github.com/containerd/containerd
- git clone github.com/containerd/nerdctl
- cd nerdctl and cd containerd to make changes
- Run
lima start
with the yaml like this
local_repo_directories:
- arch: "x86_64"
nerdctl_directory: "~/workspace/nerdctl"
nerdctl_directory: "~/workspace/containerd"
- Use
lima nerdctl ...
to test my change.
I can help the design and implementation if you think this is a proper and useful feature for Lima