This is the 21st day of my participation in the August Text Challenge.More challenges in August
Docker
Why?
One product: at least two environments (development, production) from development to launch
In the development of the project, we may encounter the following problems:
- In the development of computers can run! There are problems in other environments
- The service is unavailable due to a version update. Procedure
- Environment configuration is a hassle, each machine has to deploy the environment (cluster
Redis
,ES
,Hadoop
…). Configuration is time-consuming and laborious- Cannot be cross-platform (e.g
Windows
The development,linux
Release)
So, we would like to see the project packaged with the environment at deployment time! For example, release a Spring Boot project with a database, cache, etc.
Tradition: Development packages projects and leaves the rest to OPERATIONS. Now: Development packages, deployment goes live, one process is done
Docker is a solution to the above problems!
For example, if a developer releases an app to the app store, users download it, install it, and use it
Develop –> APK –> Publish (App Store) –> Download APK –> Install and use it
Docker is a project and environment packaged by developers, released to the warehouse, operation and maintenance personnel can download and run
Develop –> JAR (package project with environment: image) –> publish to (Docker repository) –> Operation download –> Run and use
Docker
The idea comes from the container!
Isolation:Docker
The core idea of packing boxes is that each box is isolated from the other.
Before the use of Docker, there are many applications running on one system, and some problems may occur between multiple applications, and these applications are cross (such as using database, port error), and there is no impact between projects.
Docker
You can make the most of your server with isolation!
Docker
history
In 2010 Solumon Hykes, a French-American developer and entrepreneur, set up dotCloud, an American company, to offer some PaaS cloud computing services.
On the underlying technology, dotCloud platform utilizes Linux container technology. To facilitate the creation and management of these containers, dotCloud developed a set of internal tools, later named Docker. That’s how Docker was born!
In 2013, dotCloud’s PaaS business was slow, and the company needed to break new ground. So they hired Ben Golub as the new CEO, renamed the company Docker, abandoned the dotCloud PaaS platform, and embarked on a new journey with the mission of “bringing Docker and container technology to the world”. At the same time, Docker is open source, and more and more people find the advantages of Docker. Docker will be updated once a month.
Docker1.0 was released in April 2014!
Why is Docker so popular?
Compared to other container technology, very lightweight!
Before container technology, it was all about VM ware.
Virtual machine: need to install VM ware first, through this software we can virtual out one or more computers. Virtual computers will be bulky and take up a lot of resources.
Virtual machines are virtualization technologies.Docker
Container technology is also virtualization technology
Vm: Linux centos Native Image (a COMPUTER) Isolation: Multiple VMS with a size of several GB need to be started for several minutes.
Docker: isolation: mirror (the most core environment: 4m, then we need to install what to add what to go in), very small, run the mirror. It’s a few meters in size and starts in seconds
Docker is based on the GO language.
Website: www.docker.com/
Documentation: docs.docker.com/ The documentation is very detailed
Warehouse address: registry.hub.docker.com/
Docker
What can you do?
Virtual Machine Technology
Disadvantages:
- Too many resources are occupied
- There are many redundant steps
- Slow start
Containerization technique
Containerization techniques do not simulate a complete operating system, but the core of the operating system
To compare
- Traditional VIRTUAL machines (VMS) : Create a virtual set of hardware, run a complete operating system, and install and run software on this system
- The applications in the container run directly on the kernel of the host machine. The container does not have its own kernel, nor does it virtual our hardware, so it is lightweight
- Each container is isolated from each other. Each container has its own file system, which does not affect each other.
DevOps
(Development operation and maintenance)
- Faster delivery and deployment
Tradition, a bunch of help documents, installation programs
Docker: Packaged image release tests, one run
- Easier upgrade and capacity expansion
With Docker, we deploy a collection of apps like building blocks!
- Simpler system operation and maintenance
After containerization, our development and test environments were highly consistent.
- More efficient use of computing resources
Docker is kernel-level virtualization that can run many container examples on a physical machine! Server performance is squeezed to the hilt.