Position: Home page » Computing » Docker decentralized architecture

Docker decentralized architecture

Publish: 2021-04-14 15:59:45
1. It's not easy to understand the difference between docker images and docker containers
assuming that the Linux kernel is layer 0, docker runs on top of the kernel layer no matter how it runs. This docker image is a read-only image located at layer 1. It cannot be modified or saved
a docker image can be built on top of another docker image, and the cascading relationship can be multi-layered. The image layer of the first layer is called base image, and the images of other layers (except the top layer) are called parent image. These images inherit all the properties and settings of their parent images, and add their own configuration in dockerfile
docker images are identified by image ID. The image ID is a 64 character hexadecimal string. However, when we run the image, we usually do not use the image ID to refer to the image, but use the image name to refer to it. To list all valid local mirrors, use the
2. Docker is a platform for developers and system administrators to develop, migrate and run applications. After the application is packaged into docker image through docker, it can be downloaded, started, extended, deleted and migrated in a unified way, which facilitates the deployment and operation and maintenance of the application. https://community.emc.com/docs/DOC-42054
docker adopts server / client mode. Docker clients can create, run or deploy docker containers by interacting with docker daemon. Users can install docker client and docker daemon on the same system or on different systems. Docker client communicates with docker daemon through port or restful API
docker consists of three parts:
docker images: docker image is a read-only template used to create a docker container. The image can include Linux operating system, Apache or web application, etc. users can download the created docker image, or create docker image for other users
each image consists of many layers, which are bound in one image by docker through union file systems. Each image is based on a primary image, and then a new layer is added to these primary images through operation instructions, which can be running commands, adding files or directories or creating available operating environment. These operation instructions are saved in the "dockerfile" file
docker registers: docker registers are used to save docker images, which can be divided into public and private use. A public docker registry is a docker hub. Users can also create a private docker registry to download docker images for other users
docker containers: similar to the directory where VMware virtual machine configuration files are saved, it can provide all the elements for application running. Docker containers can be run, started, stopped or deleted. Each container is an isolated security application platform.
3.

Docker was released as early as 2013, but few people knew about it. Until 2014, Martin Fowler put forward the concept of micro service. Two unrelated technologies finally came together and created today's glory

now: after using the docker container, we can package our application into a container, which contains the application code, running environment, dependency library, configuration file and other necessary resources. The process level isolation is achieved between containers. The operation in the container will not affect the host and other containers, so there will be no interaction between applications

4. When you want a container to do two things, or a docker image to contain dependent libraries from two different images, you need to know the dockerfile of each image. This paper introces how to reverse engineer docker images through docker history command, get their docker files, organize them into a docker file, and then build them, so as to achieve what you want to do

as the saying goes, "don't reinvent the wheel!"

when using docker, before building your own image, you'd better find some images that can be used directly in docker hub for practice. The software architecture is distributed in a series of containers, each container only does one thing, which is very good. The best cornerstone of building distributed applications is to use official images from docker hub, because their quality can be trusted

in some cases, you may want a container to do two different things. In other cases, you may want a docker image to contain dependent libraries from two different images. If you have dockerfile for each image, this is very simple. Organize them into a docker file and build them

however, most of the time, images prepared on docker hub are used, and their source dockerfile will not be available. I spend time looking for a tool that can merge (or flatten) two different docker images, of course, without their dockerfile. That is to say, we are looking for something that can do the following things:
Image 1 --
&< br />---> merged_ image_ 12
/
image 2 --

there were two related discussions (1 and 2) on GitHub before, although they were all closed

is this possible
is there a tool that can do this: docker merge image2 image2 merged_ image

no
you can't even build a dockerfile in the following way:
from image1
from image2

in short, you can't have multiple underlying images in a dockerfile

but I need this feature
the only solution is to get the docker files of these images, organize them into a file, and then build them. So, can I get a docker file of image on docker hub? Fortunately, I can. It can't be obtained offline, but you can use the docker history command to reverse engineer it

how to use it
use docker pull to download images from docker hub on your machine
docker pull image1
docker pull image2

and then use docker history to get the commands running when building the two containers< br />docker history --no-trunc=true image > image1-dockerfile
docker history --no-trunc=true image2 > Image2 dockerfile

next, open these two files and you can see the command stack of each image. This is because docker images are built through layers (read more). That is, the new image created by each command you type in dockerfile is on top of the image generated by the previous command. So you can reverse engineer the image

the only scenario that restricts the reverse engineering of an image is that the image maintainer uses add or commands in his dockerfile. You will see this line:
Add file:1ac56373f7983caf22
or add dir:cf6fe659e9d21535844
this is because the maintainer does not know what local files are used on his own machine, including the image.
5. Democracy....?? I haven't seen this before.. Can I eat it Whose democracy can last forever... This thing's words are unfair...
6. Use spring cloud to build the actual microservice architecture. Basic concept: using docker for integration testing, mixed persistence microservice architecture service discovery API gateway docker uses docker to build and deploy every service. Using docker compose to do end-to-end integration testing on a development machine.
7. Docker swarm is an official cluster container management tool. It is characterized by lightweight and seamless support for standard docker API. In simple terms, swarm explains its architecture and commands clearly. This paper builds and manages a swarm cluster from scratch.
8. The architecture of docker container includes physical machine with host operating system. The docker engine is deployed on the host operating system, which helps to build a virtual container for hosting running applications. The docker engine builds isolated containers on which applications can be deployed. Unlike a typical hypervisor solution, docker does not need to build a separate virtual machine for each application or install a guest operating system for each virtual machine/ Thread / 215659 in application virtualization based on hypervisor, the virtualization platform (such as Hyper-V or VMware) is deployed on the physical server with host operating system. Each virtual machine has its own guest operating system. Applications are deployed on all of these layers. Hosting so many virtual machines (each virtual machine has its own guest operating system) makes this architecture require more resources than docker container. Container automation computing resource requirements process isolation and secure startup time application delivery hardware compatibility enterprise class function provider
9. After studying the official compilation steps of docker, it is found that local compilation is also very simple. You only need to execute the following command in the directory of docker source code:. / hack / make.sh binary. The above command will only generate the binary file of docker, but it will not be so smooth. You will find the error when executing this command. If the first execution
Hot content
Inn digger Publish: 2021-05-29 20:04:36 Views: 341
Purchase of virtual currency in trust contract dispute Publish: 2021-05-29 20:04:33 Views: 942
Blockchain trust machine Publish: 2021-05-29 20:04:26 Views: 720
Brief introduction of ant mine Publish: 2021-05-29 20:04:25 Views: 848
Will digital currency open in November Publish: 2021-05-29 19:56:16 Views: 861
Global digital currency asset exchange Publish: 2021-05-29 19:54:29 Views: 603
Mining chip machine S11 Publish: 2021-05-29 19:54:26 Views: 945
Ethereum algorithm Sha3 Publish: 2021-05-29 19:52:40 Views: 643
Talking about blockchain is not reliable Publish: 2021-05-29 19:52:26 Views: 754
Mining machine node query Publish: 2021-05-29 19:36:37 Views: 750