lima
lima copied to clipboard
bash: line 1: nerdctl: command not found
Description
lima version: 0.9.0 machine: m1 max macbook
Description When I install lima from brew using the instructions on the README, I get so far that I can see the virtual machine running. But when I try to run lima nerdctl I get bash: line 1: nerdctl: command not found
So I'm trying to hunt down the missing instructions. But I've not found out what it is yet. Does anybody know?
I was told that this is by default and my issue was closed without any further discussion, so I have to open another issue with the same information because the issue is not fixed by the help given.
> nerdctl.lima
bash: line 1: nerdctl: command not found
and the contents of this file is just a shell script wrapper around lima nerdctl anyway
> cat $(which nerdctl.lima)
#!/bin/sh
set -eu
exec lima nerdctl "$@"
So to recap: lima nerdctl doesn't work and the nerdctl.lima script is just a wrapper around lime nerdctl anyway. So neither of this solutions works right now.
So I have the same problem, even with the help suggested. Please don't automatically close this issue without letting me respond.
What does limactl shell default nerdctl show ? Did you add some shell alias, called "lima" ?
It shows the same
limactl shell default nerdctl bash: line 1: nerdctl: command not found
It is of course possible that the nerdctl installation failed to install the nerdctl command in the VM.
anders@ubuntu:~$ lima
anders@lima-default:/home/anders$ which nerdctl
/usr/local/bin/nerdctl
There should be traces of it in /var/log/cloud-init-output.log, inside the virtual machine.
sudo grep nerdctl /var/log/cloud-init-output.log
I can run docker containers if I shell into the lima vm I created and use docker there.
> limactl shell default docker run -it --rm alpine sh
/ # uname -a
Linux b5827e18c7d4 5.13.0-28-generic #31-Ubuntu SMP Thu Jan 13 17:44:32 UTC 2022 aarch64 Linux
Ah, if you use the docker.yaml you will get docker (and not nerdctl, as per default.yaml)
But then it will normally show you the instructions, on how to configure your docker client ?
I created the vm like this lima start --name=default template://docker
I want to run containers as if it was docker, I thought I could do that with nerdctl?
Looking back at the installation instruction, it's not explained that using the docker template doesn't use nerdctl. But if I want to use it but running containers, then how can I do it using nerdctl? Perhaps this is just a documentation issue?
I created the vm like this lima start --name=default template://docker
I want to run containers as if it was docker, I thought I could do that with nerdctl?
Looking back at the installation instruction, it's not explained that using the docker template doesn't use nerdctl. But if I want to use it but running containers, then how can I do it using nerdctl? Perhaps this is just a documentation issue?
Alright well I did see those instructions and none of them worked, perhaps again a documentation issue. See this issue here: https://github.com/lima-vm/lima/issues/728
Perhaps this is just a documentation issue?
It seems that way. The engines need to be separate.
default.yaml uses nerdctl.lima
docker.yaml uses docker
podman.yaml uses podman
etc
They all allow running containers, but each in their own way.
I think a couple of lines of text adding that default.yaml lets you use nerdctl like it explains in about 10+ tutorials around the web, but this is not available with docker.yaml, because that was not obvious and not documented from what I can see. So it's a bit confusing. Do you mind adding that as a piece of text on that readme section? I think it would help a lot.
I could also do a pull request, but then I'd have to fork the repo and make a pull request for a single text edit but you might know exactly how to write this better than I would. Do you prefer me to open a pull request?
Personally I think the README is getting a bit long, but the change from docker.yaml to template://docker is quite recent
My idea (in https://github.com/afbjorklund/lima-gui/issues/7) was having it more like a "book", but text is text I suppose. Maybe a PR for maintainers ?
Yeah I like that idea, I've seen projects use the wiki functionality for it and use the README.md to link into the front page and then break stuff up, especially a complex project like this.
Btw. I'm super impressed so far. I haven't pushed this to running more than a couple of simple containers. But I'm about to launch a whole microservice docker container setup on it ;) I wonder how it'll react
Eventually it will need a website for users, and not just this GitHub developer page...
I like GitHub Pages myself, but I don't know what Lima says ? But there is a logo now!