user993797
user993797

Reputation: 145

Can docker images be used as a bootable images

Is a docker image bootable by any boot-lader ( say grub ?) without using docker at all? Save the image out to a disk and bring it up as a standalone OS partition

Upvotes: 1

Views: 611

Answers (2)

BMitch
BMitch

Reputation: 264791

Not directly with a docker image, since the image is only the filesystem for the application, and not the kernel and other utilities needed to run a Linux OS (e.g. networking).

However, there is LinuxKit, which is a container based operating system. This is how Docker runs the VMs for desktop environments (Windows and Mac). LinuxKit packages a kernel with containerd and a very simple init process, along with any images you want to start. There are a few bare metal options, but mainly it's designed to be a VM image.

Upvotes: 4

David Maze
David Maze

Reputation: 159752

No. Docker images don’t have their own Linux kernel, any sort of hardware device driver, any sort of console login mechanism, network configuration tools, or a wide variety of other things you need for a fully functional OS.

Upvotes: 0

Related Questions