Hacker News new | past | comments | ask | show | jobs | submit login

I've been doing something similar, but I've been taking it one step further: Alpine's apk package manager will let you treat a subdirectory as "root" and you can install packages there. Then you can write the root out as a tar file and use that as the file system for a "FROM scratch" Docker build. One deficiency is that every package seems to depend on the Busybox shell, so the only way to get rid of that is to delete it after it's installed.

So far this approach seems to work OK, but it feels unnecessarily hacky, and I wish there was better tool support for this kind of thing.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact