Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

new to docker,wonder how to read docker's source code?

Tags:

docker

Don't know if it's ok to post here, new to docker and using it to build a simple app engine, so i want to look inside docker to see what's going on.

forked the source code,but you know, it's a little harder for me to read it directly,because have no idea on the whole map of it's execution flow,so i want to ask for help,how to read the source code of docker?whether anyone had write some post to explain on it?

background info: know how to use docker ,familary with it's commands

thanks for your help:)

like image 841
magicshui Avatar asked Mar 25 '14 15:03

magicshui


2 Answers

Docker is written in go language. The two fundamental principles you need to understand are the cgroup and namespacing capabilities of the Linux kernel.

Have a look at the docker's github source code repository and contributing to docker guide. Also, you can check this book, it explains how to extend docker.

For the source code, you can start from docker.go file.

Hope this will help.

like image 79
Manohar Negi Avatar answered Sep 27 '22 23:09

Manohar Negi


In addition to existing comments and useful information contained in them, you could also refer to Docker Code Walk resource.

like image 22
Ostati Avatar answered Sep 28 '22 00:09

Ostati