First meet docker

Time:2021-10-22

Docker learning

  • Docker overview
  • Docker installation
  • Docker command
    • Mirror command
    • Container command
    • Operation command
    • 。。。
  • Docker image!
  • Container data volume!
  • DockerFile
  • Docker network principle
  • Idea integration docker
  • Docker Compose
  • Docker swarm simplified k8s
  • CI\CD Jenkins

Docker overview

Product: Development – Online two sets of environment! Application environment, application configuration!
The environment configuration is troublesome, and it takes time and effort for each machine to deploy the environment (redis, ES, Hadoop)
Publish a project (jar + (redis MySQL JDK es)). Can the project be installed and packaged with the environment!

The application environment redis MySQL JDK es Hadoop was previously configured on the server, which is cumbersome and cannot cross platform.
Windows, finally Linux!

Tradition: development jar, operation and maintenance to do!
Now: development, packaging, deployment and launch, and a set of processes are completed!

Java – APK – publish (app store) – Download – install
Java – jar (environment) – package the project with the environment (image) – (docker warehouse: store) – download the image we released – just run it directly!

Docker proposed solutions to the above problems!

Docker’s idea comes from container!
JRE – multiple applications (Port conflict) – originally, they were all crossed
Isolation: the core idea of docker! Packing! Each box is isolated from each other
Docker can make full use of the server through the isolation mechanism!

Docker history

In 2012, several young people set up a company in the United StatesdotCloud
Do some pass cloud computing services! LxC related container technology
They use their own technology, containerization technology, and the command is docker
Docker didn’t attract the attention of the industry when it was just born!
Open Source

In 2013, docker was open source!
More and more people find that docker is a little. Docker is updated once a month
Docker 1.0 was released in 2014
Docker, why fire? Very light
Before container technology, it was virtual machine technology
Virtual machine: one or more computers are virtualized through virtual software! Bulky!
Virtual machine is also a virtualization technology. Docker container technology is also a virtualization technology!

VM: Linux CentOS image (one computer) is isolated, and multiple virtual machines need to be started for a few minutes
Docker, isolation, and image (the core environment 4m + JDK + MySQL) are very lightweight. Running the image can take several m KB seconds

By now, all developers should be able to docker

Docker is developed based on go language! Open source!

Official website:www.docker.com/
Document address:docs.docker.com/
Docker document is super detailed!

Warehouse address:hub.docker.com/
git push/pull

What can docker do

Previous virtual machine technology

First meet docker
Disadvantages:

  1. It takes up a lot of resources
  2. Redundant steps
  3. Slow start

Containerization Technology

Containerization technology does not simulate a complete operating system

First meet docker

Compare docker and virtual machine technologies:

  • The traditional virtual machine virtualizes a piece of hardware, runs a complete operating system, and then installs and runs software on this system.
  • The applications in the container run directly in the kernel of the host. The container itself does not have its own kernel or virtual hardware
  • Each container is isolated from each other, and each container has its own file system, which does not affect each other.

Devops (development, operation and maintenance)

Faster delivery and deployment
Traditional: a pile of help documents, installer
Docker: packaging image release test, one click operation
More convenient upgrade and expansion
After using docker, we deploy applications, just like building blocks!
Simpler system operation and maintenance
After containerization, our development and testing are highly consistent
More efficient utilization of computing resources
Docker is kernel level virtualization. It can run many container instances on a physical machine, and the performance of the server can be squeezed to the extreme!

This work adoptsCC agreement, reprint must indicate the author and the link to this article