News for hackers. Stuff that matters.
Re:What Exactly is Docker? by Waterluvian on Saturday February 01, 2020 @02:10PM (#22212520)
So it's an OS though right? Like Ubuntu is running, chugging along like Ubuntu does. And is it sitting on top of some virtual hardware interface to simulate IO?
Re:What Exactly is Docker? by dharmab on Saturday February 01, 2020 @02:13PM (#22212541)
No, this is absolutely wrong. Docker containers don't contain a kernel or any init system. They are simply Linux processes that are isolated from each other using a few native features of Linux.
Re:What Exactly is Docker? by ofrzeta on Sunday February 02, 2020 @02:58AM (#22215792)
Still most images are based on distros because it's so convenient. Apart from software written in Go that is usually shipped as images based on "scratch". I think there should be simpler building blocks for assembling images thatn complete distro images. For instance when you create an Nginx image it could just contain the Nginx binaries and the libraries they are linked with.
Re:What Exactly is Docker? by Waterluvian on Saturday February 01, 2020 @02:22PM (#22212599)
Okay awesome. So then why is my base image called Ubuntu 18.04? It sounds like theres an OS there. That's why I intuitively assemble a model of there being an OS. Not that I'm asking you to explain, but that I wish educational content could start from a common place and explore why it's different.
Re:What Exactly is Docker? by sammnaser on Saturday February 01, 2020 @03:06PM (#22212881)
Different Linux distributions ship with various package managers / other userspace tooling. But they all run on top of the Linux kernel. I can see how having a base image called "Ubuntu 18.04" might make it seem like there's an entire OS running in the container but that's not the case. Check out this Ubuntu base image Dockerfile https://github.com/tianon/docker-brew-ubuntu-core/blob/bcdd3..., you can see that it's throwing a tarball for the root filesystem into the container (and some Docker-specific stuff), nothing crazy.
Re:What Exactly is Docker? by umanwizard on Saturday February 01, 2020 @03:07PM (#22212883)
The kernel is a tiny, insignificant part of what makes Ubuntu Ubuntu.

Running an Ubuntu user land on top of some generic other Linux kernel will for almost all practical purposes feel the same as running real Ubuntu.

Re:What Exactly is Docker? by bspammer on Saturday February 01, 2020 @03:15PM (#22212938)
Ubuntu is just a collection of software. The most important piece of software in that collection is the Linux kernel.

That kernel is what is shared between different containers. You can have 5 copies of Ubuntu (or Debian, or Mint) in separate containers, but they're all using the same kernel. This is what makes containers much more efficient than multiple full VMs.

Re:What Exactly is Docker? by akvadrako on Saturday February 01, 2020 @02:47PM (#22212763)
Depends what you mean by OS. There isn’t a kernel but there is an entire user space with an init process, so the GNU part of GNU/Linux.
Re:What Exactly is Docker? by notyourday on Saturday February 01, 2020 @05:48PM (#22213756)
In your example, the docker image makes a certain presumption - the presumption is that the OS that the host is going to run is Ubuntu-ish and 18.x generation-ish and probably runs on a 64bit amd_64. So unless your code is very complicated, then probably by pulling Ubuntu 18.04 libraries and setting some linker rules things are going to work on most systems.
Re:What Exactly is Docker? by detaro on Saturday February 01, 2020 @02:12PM (#22212533)
> And is it sitting on top of some virtual hardware interface to simulate IO?

Not really, no. Software in a container directly talks to the kernel of the host using the normal APIs the kernel provides. A container does not contain a kernel!

Re:What Exactly is Docker? by brutal_boi on Saturday February 01, 2020 @02:19PM (#22212580)
No, not at all.

They are just applications running on top of the very same kernel you would run any application from.

The kernel just provides enough layers of separation on the necessary structures.

There's plenty of material on it; if interested I'd suggest to start to study by kernel namespaces as @mav3rik pointed out.

Re:What Exactly is Docker? by mav3rick on Wednesday February 05, 2020 @09:42PM (#22253016)
Just goes to show how lying about concepts never helps your understanding.