展示HN:在Node.js中运行Linux
我们刚刚发布了 Endor 的 v0.2 版本,这是一个用于在 Node 运行时中创建运行 Linux 的开发沙箱的工具。只需输入以下简单命令:
`npx -y u/endorhq/cli@latest run alpine --shell --allow-net`
您就可以在 4-5 秒内获得一个功能齐全的 32 位 Alpine Linux 实例,并且支持网络功能。它是临时的和沙箱化的,因此一旦您按下 Ctrl-C,所有内容都会消失。这非常适合快速测试各种内容。它基于 Node 内部的 Wasm 引擎,因此运行速度比本地环境慢,但仍然可以使用。
更多信息请查看我们的公告博客文章:[https://endor.dev/blog/endor-0-2](https://endor.dev/blog/endor-0-2)
查看原文
We just released v0.2 of Endor, our tool for creating dev sandboxes that run Linux inside the Node runtime. With a simple command like<p>'npx -y u/endorhq/cli@latest run alpine --shell --allow-net'<p>you can have a fully functional 32bit Alpine Linux instance with networking, within 4-5s. It is ephemeral and sandboxed, so as soon as you press Ctrl-C, everything is gone. Great for quickly testing stuff. It is based on the Wasm engine inside Node, so it runs way slower than native, but usable<p>More info in our announcement blog post: <a href="https://endor.dev/blog/endor-0-2" rel="nofollow">https://endor.dev/blog/endor-0-2</a>