Skip to content

Make bootable linux disk image abusing docker

Notifications You must be signed in to change notification settings

githubjqh/docker-to-linux

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-to-linux - make bootable linux disk image abusing docker

There is no real goal behind this project. Just out of my curiosity what if:

  • launch a base Linux container (debian, alpine, etc)
  • pull in Linux kernel & init system (systemd, OpenRC, etc)
  • dump container's filesystem to a disk image
  • install bootloader (syslinux) to this image...

Then it should be probably possible to launch a real virtual machine with such an image!

Try it out:

make debian
qemu-system-x86_64 -drive file=linux.img,index=0,media=disk,format=raw
make clean

make alpine
qemu-system-x86_64 -drive file=linux.img,index=0,media=disk,format=raw
make clean

It works!

Check out Makefile for more details or read my article on iximiuz.com.

About

Make bootable linux disk image abusing docker

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Makefile 63.7%
  • Shell 23.0%
  • Dockerfile 13.3%