TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Build Your WSL Distro in Docker

48 点作者 K0IN8 个月前

6 条评论

K0IN8 个月前
I love WSL, but I have multiple systems and juggling apt packages is a pain.<p>So I had this in my head for a long time, that I can just build a rootfs using docker and load it in WSL.<p>I tried it yesterday, and now I have a CLI tool to build my WSL image using Dockerfiles.<p>I&#x27;m not sure if it helps <i>anyone</i>, but I wanted to share it, just in case.<p>Cheers.
评论 #41521716 未加载
评论 #41524480 未加载
marmaduke8 个月前
This is awesome! I was just today building a new wsl distro, and I didn’t want it tied to just a version of Linux but rather a project. I had to download a rootfs of Ubuntu and import it, and then spent time installing everything. Ofc I could use a bash script to automate the second part.<p>So this would have solved my prob: have a dockerfile or image and up an wsl env for it. Given how great wsl is these days (i used to have Linux and Mac as daily drivers, now wsl) I guess this sort of thing will become more and more relevant
Rucadi8 个月前
Nice tool :) I did something similar in a hackathon some years ago. <a href="https:&#x2F;&#x2F;github.com&#x2F;Rucadi&#x2F;wsld">https:&#x2F;&#x2F;github.com&#x2F;Rucadi&#x2F;wsld</a><p>It&#x27;s totally unmaintained and forgotten :D<p>In general, what I do now to generate WSL images is to docker run a container, and then export it to a .tar, finally, install that tar, is that easy.<p>However, if I had your tool installed, for sure I would use that for ease of use.
评论 #41523631 未加载
el_oni8 个月前
Very cool, this should help me to be able to separate my different testing environments.<p>Thanks for sharing!
cckk8 个月前
looks cool! Forgive my ignorance, but what&#x27;s the adv of this over using Docker on WSL2?
评论 #41543900 未加载
pasi13378 个月前
Thats a pretty nice thing to have!<p>Thanks for sharing this.