iximiuz / docker-to-linux

Make bootable Linux disk image (ab)using Docker
https://iximiuz.com/en/posts/from-docker-container-to-bootable-linux-disk-image/
669 stars 93 forks source link

WIP for adding optional etc configurations and mount using drive UID #18

Open cdbattags opened 3 years ago

cdbattags commented 3 years ago

Hi @iximiuz,

Just wanted to get this up and viewable for my current progress. By no means is this ready for a merge but I'd like to discuss how we'd like to optionally package bridge packages in a separate Dockerfile.bridge as a multi-stage build step.

Also, we could add a separate context for specifying these sorts of etc config files.

A few questions to start:

Let me know what you think. Thank ya.

As is now, this will properly boot on Digital Ocean without the bridge.

iximiuz commented 3 years ago

Hi Christian!

Many thanks for your contribution! It looks really impressive and I'm glad to learn that you were able to make it work on DigitalOcean!

Regarding your questions...

iximiuz commented 3 years ago

FYI, there is another PR #14 with an attempt to add networking support. Probably these two PRs could be consolidated in one to avoid competing efforts.

Luis (@pathcl), you may find this PR interesting.

iximiuz commented 3 years ago

As I already mentioned in #14, it'd be great to keep the bare minimal image as-is and allow it to be easily built with a simple Makefile target. That's great to have it as a starting point for further endeavors and also for educational purposes.

Multistage Docker builds can be leveraged to add the networking-related packages and configs, however, it'd complicate the base Dockerfile. I'm more inclined to add a separate Dockerfile.network starting FROM the base Docker image and adjusting the Makefile to use it when needed. WDYT about such approach?

cdbattags commented 3 years ago

Multistage Docker builds can be leveraged to add the networking-related packages and configs, however, it'd complicate the base Dockerfile. I'm more inclined to add a separate Dockerfile.network starting FROM the base Docker image and adjusting the Makefile to use it when needed. WDYT about such approach?

I think that's the best bet as well. We'll just need to sync on how we want the tagging done for the bases.

iximiuz commented 3 years ago

Currently, it's just docker-to-linux/debian (or any other distr name). We may consider renaming it to docker-to-linux/debian-base, and add a new layer for networking docker-to-linux/debian-network. Maybe eventually there will be more tree-shaped layers.