lima 轻量级虚拟机docker替代方案 (macos平台)
引言
由于某些原因,我的mac电脑的docker出了问题,无法使用docker,想到有没有类似windos上的终端虚拟机,可以直接使用命令行,经过一凡寻找,终于找到了一个替代方案
我来为大家介绍 一款免费、自由、开源的 Docker for Mac 替代品,containerd & Lima 。
你只需要执行以下命令即可快速体验:
$ brew install lima $ limactl start $ lima nerdctl run -it --rm alpine
- 启动 Lima
执行 limactl start 并按下回车选择 Proceed with the default configuration ,稍等几分钟,Lima 会自动完成下载 VM 镜像和启动虚拟机。
$ limactl start ? Creating an instance "default" [Use arrows to move, type to filter] > Proceed with the default configuration Open an editor to override the configuration Exit ... INFO[0111] READY. Run `lima` to open the shell.
在看到 READY 输出后,执行 lima uname -a 来确认虚拟机已经在运行了。
$ lima uname -a Linux lima-default 5.11.0-31-generic #33-Ubuntu SMP Wed Aug 11 13:19:04 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
3.使用虚拟机终端
- 先启动
limactl start name
- 在进入终端
limactl shell name
本文作者:学不会xuebuhui
本文链接:https://www.cnblogs.com/codedingzhen/p/18378779
版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 2.5 中国大陆许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步