godarch / darch

A tool for building and booting stateless and immutable images, bare metal.
https://godarch.com/
MIT License
832 stars 32 forks source link

Why scripts vs Dockerfiles? #46

Closed aaroncwhite closed 4 years ago

aaroncwhite commented 4 years ago

Again, cool project. I've been wanting "docker for my operating system" since I got on the container train a while ago.

I'm curious why you took the route of bash scripts vs just leveraging Docker's built in batteries for caching layers etc. At least for developing a new "recipe", I'm finding it kind of repetitive to have to run the scripts again. From what I can tell, as long as the initramfs and kernel are rebuilt in the extract step, things work when using Dockerfiles for everything except the last staging step. Currently, I'm running a local registry and having darch pull from that so I can let docker handle the heavy lifting during the build steps.

Curious if there's a reason why?

pauldotknopf commented 4 years ago

Again, cool project. I've been wanting "docker for my operating system" since I got on the container train a while ago.

Thanks! I have been using it daily for a while now. I wouldn't have it any other way.

I'm curious why you took the route of bash scripts vs just leveraging Docker's built in batteries for caching layers etc.

Docker had some limitations that didn't have easy workarounds which became a lot easier when using containerd. I was directed to use containerd because "it is the future" (see here).

Also, containerd didn't support Dockerfile building, and BuildKit wasn't ready yet.

At least for developing a new "recipe", I'm finding it kind of repetitive to have to run the scripts again.

I agree.

From what I can tell, as long as the initramfs and kernel are rebuilt in the extract step, things work when using Dockerfiles for everything except the last staging step.

I was going to suggest this, but you were smart enough to realize that!

With all the said, I've been mulling over releasing a 1.0 version with a few changes.

aaroncwhite commented 4 years ago

Cool! Thanks for the info. I'm more of a python programmer, so I could attempt to help out with some of the coding, but it might be Go code that looks like python. :man_facepalming:

I'm at least happy to help alpha test.

aaroncwhite commented 4 years ago

Heads up on this- containerd has issues if the storage location is part of the overlay. I have /var/lib/darch in a zfs overlay on a machine I just setup. Hadn't run into it with the LVM partition map you use in your bootstrap script.

https://github.com/containerd/containerd/issues/2402

Might be related to: https://github.com/godarch/darch/issues/47