If you want to write Docker by yourself, you may need to read this book (five wonderful book excerpts in the appendix at the end of the article)

Abstract: "Do it yourself Docker" is based on a detailed analysis of the technology stack that Docker relies on, step by step through code examples, so that readers can build a container engine in Go language step by step. Different from other books on Docker principle introduction or code analysis, "Do It Yourself Docker" aims to provide readers with a hands-on route to realize Docker isolation step by step, build Docker images, container life cycles, and Docker networks, etc. .





Book link

Why write this book

Docker technology can be described as one of the hottest technologies in recent years, with overwhelming technical forums and various lectures, everyone is sharing their experience on how to containerize and how to use Docker to optimize their own operation, maintenance and development processes . With the gradual popularity of Docker technology, using Docker is no longer a problem. What is more important now is the best practice of containerization in production environment, and the other is the dispute over the container orchestration framework. However, for technicians, apart from the prosperity of Docker's appearance, what is a container, how is the container created, and the technical exploration of the underlying container is also very important.
I started to get in touch with Docker in 2014, and I went through the process from the initial novelty - lamenting that there is such a good tool as Docker, to gradually becoming familiar with various functions of Docker and trying to use Docker technology in the production environment. However, I am often asked: "How is Docker technology implemented?" I can only say in a superficial way: "Docker is a container technology implemented using Linux Kernel's Namespace and Cgroups." So, what is Namespace , what are Cgroups, how does Docker use them, and how are containers created step by step? When I ask these questions, I hesitate and don't know why. It can be seen that it is particularly important to understand the underlying technologies of container technology, and then understand how they work. These are the cornerstones of the entire container technology. Mastering these cornerstones can make it easier to climb upwards.
It is very boring to just explain the underlying technical implementation details and source code interpretation. Generally speaking, it is difficult to have the patience to read a little bit carefully and then try to figure out the mystery. It is of little use to go through the technical details. Therefore, the idea of ​​writing a book like "Do it yourself Docker" was born. This book does not deliberately explain the details of container technology, what is used to explain what, and the more detailed content is left to readers to explore by themselves. By reading this book, you can understand the implementation details of container technology step by step, and you can follow the author step by step to implement it with your own code. The greatest joy of this book is to use my latest knowledge to implement my own container. This further opens your door to the container technology community. What This Book Is About The purpose of this book

is to guide the reader through the implementation details of container technology, step-by-step, to build a simple container.

From this process, understand the entire container technology field and implementation details. This book focuses on the explanation and practice of principles. Each part will have detailed code analysis, and strive to use the least and most concise code to help readers build their own containers.

The content of this book is mainly divided into 7 chapters: "Containers and Development Languages", "Basic Technologies", "Constructing Containers", "Constructing Images", "Constructing Advanced Containers", "Container Networks" and "Advanced Practices".

Containers and development languages: It mainly introduces the basic functions and features of Docker, and makes a brief introduction to the Go language that will be used later.
Basic Technology: It mainly introduces the underlying technologies for implementing containers, such as Namespace, Cgroups, and Union File System. Each section will have a textual introduction, and a short small sample program will be attached to introduce how to use this technology on the container, so that the reader can clearly understand the role of each technical point on the container.
Constructing a container: Using the basic technologies introduced in the previous two chapters to construct a simplest container environment, the overall implementation details and code analysis will be shown little by little, and the basic technologies introduced above will be directly used, which will make it more practical.
Constructing an image: Use the layered file system technology introduced in Section 2.3 to construct a simple container image, which reflects the layered idea of ​​container images.
Advanced container construction: closer to the real container implementation, adding richer functions on the basis of the original. Through the study of this chapter, readers can better understand how various technologies are integrated to realize the overall function of the container.
Container Networking: In addition to implementing a container environment, this chapter will also explain how to make your own container communicate with the host, and how to make communication between different containers closer to the real environment.
Advanced practice: Use a container written by yourself, run some common programs, and verify the availability of the container. In addition, this chapter also introduces the container runtime engine currently used by Docker and an overview of the current container runtime engine.
Wonderful book excerpt

"Do it yourself Docker" book excerpt one: Linux Namespace
"Do it yourself Docker" book excerpt 2: Linux Cgroups 
"Do it yourself" Book excerpt 3: Linux UnionFS 
"Do it yourself Docker" book excerpt Fourth: Constructing a Simple Container 
"Do It Yourself Docker" Book Excerpt Fifth: Increase Container Resource Limits

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326178032&siteId=291194637