Skip to content

Allow local repo directories in containerd archives #1263

Open
@ningziwen

Description

@ningziwen

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:

  1. cd ~/workspace
  2. git clone github.com/containerd/nerdctl
  3. cd nerdctl and make changes
  4. Run lima start with the yaml like this
local_repo_directories:
- arch: "x86_64"
  nerdctl_directory: "~/workspace/nerdctl"
  1. 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:

  1. cd ~/workspace
  2. git clone github.com/containerd/containerd
  3. cd containerd and make changes
  4. Run lima start with the yaml like this
local_repo_directories:
- arch: "x86_64"
  containerd_directory: "~/workspace/containerd"
  1. 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:

  1. cd ~/workspace
  2. git clone github.com/containerd/containerd
  3. git clone github.com/containerd/nerdctl
  4. cd nerdctl and cd containerd to make changes
  5. Run lima start with the yaml like this
local_repo_directories:
- arch: "x86_64"
  nerdctl_directory: "~/workspace/nerdctl"
  nerdctl_directory: "~/workspace/containerd"
  1. 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions