Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker internals/architecture [closed]

Tags:

docker

I've started using Docker but I want to understand it better ( a bit better). So, I am searching for a book/article to get information how it works internally ( on the OS level). I suppose that it cannot be easy subject but it should be easier than real virtualization.

I am asking for referencing me to any book/an article. I tried to find any book but I didn't find something about Docker internals.

like image 684
user7189714 Avatar asked Nov 21 '16 14:11

user7189714


2 Answers

Docker doesn't really have any internals. It's simply a golang binary wrapped around a bunch of tooling that already exists in the kernel, such as:

  • cgroups to limit an applications available resources
  • namespaces to provide isolation from other containers
  • Union Filesystems to provide fast, light access to storage

I would recommend reading about how those three technologies work before trying to understand what else docker does, as docker simply provides a more accessible API/command line tooling for these technologies.

Here's some links for further reading:

https://docs.docker.com/engine/docker-overview/#the-underlying-technology

https://washraf.gitbooks.io/the-docker-ecosystem/content/Chapter%201/Section%203/techniques_behind_docker.html

https://www.safaribooksonline.com/library/view/using-docker/9781491915752/ch04.html

like image 138
jaxxstorm Avatar answered Oct 03 '22 01:10

jaxxstorm


as @Frap linked (namespaces, cgroups, UFS) but also look at storage drivers for docker https://docs.docker.com/engine/userguide/storagedriver/selectadriver/

If you want to peak under the hood there is a nice project here https://github.com/mhausenblas/cinf

The other part of note is the networking side of docker and storage drivers etc. the docker docs are a reasonable primer on this https://docs.docker.com/engine/userguide/networking/

like image 44
Amos Folarin Avatar answered Oct 02 '22 23:10

Amos Folarin