
From Docker Container to Bootable Linux Disk Image - c8g
https://micromind.me/en/posts/from-docker-container-to-bootable-linux-disk-image/
======
pbh101
My employer built a tool which skips the disk image step and provisions a
machine directly from a Docker image. The system is still maintained and in
active use, though the open-source repo is a trailing fork:
[https://github.com/imc-trading/dock2box](https://github.com/imc-
trading/dock2box)

~~~
polskibus
Can it be used to provision VMs entirely from docker, or does it have to be
bare metal only?

~~~
pbh101
In short, no: while we do run dock2box regularly to rebuild VMs, internally
our VM creation process is separate from this tool.

------
ohiovr
I would like to have something like docker where I can describe a system kind
of like a docker file but output an ISO file instead of running it as a
container. Does something like this exist? I can't seem to find any user
friendly tools for tailoring distros. In many cases you have to mouse around.
I just want to do it with a script.

~~~
sansnomme
Yeah, the project is LinuxKit (also by Docker).

[https://github.com/linuxkit/linuxkit/blob/master/README.md](https://github.com/linuxkit/linuxkit/blob/master/README.md)

It is mostly for cloud systems (last I checked the Alpine distro was a core
dependency) and is still a bit raw but a vast improvement compared to what's
currently available. Existing solutions like Buildroot/Yocto etc. have a
horrendous UX, think editing Makefiles by hand while LinuxKit is Docker-style
single yaml defined immutable system + go binary build tool with a unified
interface.

There are also stuff like Nix and GUIX but the learning curve is non-
negligible and have a lot less money driving the development.

~~~
eatonphil
I was looking at tools a while ago at Linode while trying to automate support
for FreeBSD/OpenBSD/etc. The UX for different distributions (if provided at
all) is disparate, confusing, and poorly documented. I ended up giving up and
just building the images by hand and hosting them [0].

I've seen linuxkit a few times now but it didn't click that this is what it
does.

The problem still remains that there's no good distribution-agnostic
combination of boot image creator + provisioning system. The ideal situation
is one tool that allows me to start with an arbitrary base distribution,
provision it, and build a bootable image for the VM provider of my choice
(VirtualBox, EC2, bhyve, etc.).

[0]
[https://github.com/eatonphil/linode_deploy_experimental](https://github.com/eatonphil/linode_deploy_experimental)

~~~
sansnomme
I suppose you can always fork and create UnixKit :)

------
eatonphil
Someone in the comments on this site posted darch [0]. Looks interesting.

[0] [https://godarch.com/](https://godarch.com/)

~~~
agumonkey
I missed that entirely.. surprising.

[https://old.reddit.com/r/archlinux/comments/7uqf88/announcin...](https://old.reddit.com/r/archlinux/comments/7uqf88/announcing_darch_a_tool_written_in_go_for_booting/)

~~~
pknopf
Author here, if anyone has any questions.

I've been using it for over a year with Ubuntu.

Here are my recipes: [https://github.com/pauldotknopf/darch-
recipes](https://github.com/pauldotknopf/darch-recipes)

~~~
eatonphil
Since the darch site and repo have no clear examples it kind of looks like
vaporware. It's good to see this darch-recipes repo! I recommend adding some
links or showing examples on the main site and repo too!

~~~
pknopf
The "test drive" allows you to run it in a VM.

[https://godarch.com/test-drive/](https://godarch.com/test-drive/)

Check this: [https://pknopf.com/post/2018-11-09-give-ubuntu-darch-a-
quick...](https://pknopf.com/post/2018-11-09-give-ubuntu-darch-a-quick-ride-
in-a-virtual-machine/)

