Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run *BSD OS on Docker?

Tags:

docker

bsd

How to run *BSD (Open, Free, etc.) on Docker?

I am using Docker for Mac.
But There is no BSD image on Docker Hub.
How I can run it?

like image 408
KiYugadgeter Avatar asked Sep 15 '16 11:09

KiYugadgeter


People also ask

Can you run FreeBSD on docker?

It's a container format not an emulation or virtualization platform. So, no, there are no FreeBSD docker images, just as there are no Windows or MacOS docker images. The only reason you can run docker images on Windows is because of WSL.

Can you run an OS on docker?

You can run both Linux and Windows programs and executables in Docker containers. The Docker platform runs natively on Linux (on x86-64, ARM and many other CPU architectures) and on Windows (x86-64). Docker Inc. builds products that let you build and run containers on Linux, Windows and macOS.

Are FreeBSD jails containers?

"FreeBSD jails are the original 'container'" FreeBSD jails pre-date containers like Docker by a long shot and as such, are far more straightforward.

What is Dockerd command?

The docker run command first creates a writeable container layer over the specified image, and then starts it using the specified command. That is, docker run is equivalent to the API /containers/create then /containers/(id)/start .


1 Answers

Docker doesn't actually run a full OS. Because it uses the host's kernel to run the container contents, it's not able to run a different kernel than the one used by its host OS. Further, as far as I understand, Docker relies on Linux-specific features for its fundamental operation. So it's not possible to run it with a BSD or another non-Linux kernel, including the XNU kernel used by MacOS, as its host environment. On a Mac, Docker actually runs within a virtualized Linux environment, so its host environment is Linux.

Now, in theory, if someone got a BSD userland to run on a Linux kernel, it might be possible to have a nearly-BSD Docker container. However, some research suggests that no project doing this has succeeded.

All of that means that there's no way to run a true BSD as a Docker image, which is why there is no BSD image for Docker.

like image 68
andyg0808 Avatar answered Oct 21 '22 00:10

andyg0808