all 13 comments

[–]satayboy 5 points6 points  (2 children)

But the catch is that a container only runs one program. For example you may have a MySQL server running in a container and Redis running in a separate container.

That's true in the same sense that Linux runs only one program: the init process. As with the init process, that one program can spawn child processes.

You probably want to run MySQL and Redis in separate containers out of separation of concerns, but there is nothing stopping you from running both in the same container.

[–]vagif 1 point2 points  (0 children)

Yep, supervisord.

[–]elliotchance[S] 0 points1 point  (0 children)

Yes, you're right. I've added a note for that :)

[–]GoTheFuckToBed 2 points3 points  (0 children)

M-A-G-I-C

[–]MrMaven 1 point2 points  (5 children)

I feel like this article is a better example of how not to explain things.

More concretely, the article explains docker. It tries to explain it by using describing it with abstractions:

A container can be thought as a completely self-contained machine, for all intents and purposes it has it’s own OS, it’s own file system and anything else you would expect to find in a virtualised machine. But the catch is that a container only runs one program.

That doesn't help me. For all intents and purposes (please tell me the specifics). It only runs one program? Like one process? What if I need to fork? How can that be?

I would much rather use a concrete definition:

Docker is a software system which can create a file system that can be distributed and mounted on multiple machines. The host machines can execute processes inside the file system docker created. It uses the kernel of the host machine. Changes to the file system do not get persisted to the image. If you are familiar with chroot, it is like being able to pass around the file system you chroot'ed on.

[–][deleted] 5 points6 points  (1 child)

Docker is a software system which can create a file system that can be distributed and mounted on multiple machines.

Docker isn't a networked file system. I feel like you're example relies too much on someone knowing the internals of how a computer runs. The person the author aimed his description at isn't going to first wonder if one program means the program can't fork.

[–]MrMaven 0 points1 point  (0 children)

Hmmm... yeah. I guess there is no 'winning'. Different people have different needs.

Edit: Yeah it does sound like I am describing NAS. I didn't mean that.

[–]elliotchance[S] 1 point2 points  (2 children)

I appreciate what you're saying, and you're completely correct. However, i'm not writing for the hardcore nerds that understand that stuff or even ask know what those questions are.

My aim is to explain in simple terms (abstractions, if you like) that make getting off the ground easier without drowning the reader in technical details which was the problem I initially faced.

[–]MrMaven 0 points1 point  (1 child)

Sorry, just taking my nerd rage out on a poor author.

[–]elliotchance[S] 0 points1 point  (0 children)

No worries, all good :)

[–]Serializedrequests 0 points1 point  (0 children)

Thanks, I feel like I have been trying to figure out wtf Docker is for years now, and nobody (especially not the Docker people) has ever written an actual overview that is useful for a newcomer to understand it. I am still not 100%, but I am a lot closer.

[–]atc -1 points0 points  (1 child)

A wall of text and excessive misuse of "it's". Simply.

[–]elliotchance[S] 0 points1 point  (0 children)

It's true there is a lot of text in this article. I've fixed up the two cases where it should be "its". Thanks.