Recently found that B website crazy god said Java is very good, recommended to everyone, some of the teacher’s learning ideas are also very good:

  • Weakness and ignorance are not obstacles to survival, arrogance is.
  • Even the smallest sail can sail far.
  • As long as you don’t die, learn from death.

Docker’s learning route

  • Docker overview
  • Docker installation
  • Docker command: image command, container command, operation command……
  • Docker mirror
  • Container data volume
  • DockerFile
  • Docker network principle
  • The IDEA of integration of the Docker
  • Docker Compose
  • Dokcer Swarm
  • CI\CD jenkins

Overview of Docker

1. Why does Docker appear?

One product: Development – two sets of environments online! Application environment, application configuration!

Development – Operations. Question: I can allow it on my computer! Service unavailable due to version update! It’s very challenging for operation and maintenance

Big?

Environment configuration is very troublesome, every machine has to deploy the environment (clustered Redis, ES, Hadoop…) ! Take a lot of trouble.

Release a project (JAR + (Redis MySQL JDK ES)), project can not bring the environment installation package!

Redis MySQL JDK ES Hadoop Hadoop

Developed for Windows and finally released to Linux!

Tradition: Jar development, operation and maintenance!

Now: development package deployment online, a set of processes complete!

Android process: Java – APK – release (app store) a three use apK one installation can be used!

Docker process: Java-JAR (environment) – Package the project along with the environment above (image) – (Docker Repository: store) —–

Docker provides solutions to the above problems!

Docker’s idea came from the container!

JRE – multiple applications (conflicting ports) – turns out to be interlaced!

Isolation: The core of Docker! Pack and box! Each box is isolated from each other.

Docker through isolation mechanism, can use the server to the extreme!

Essence: all technology is because there are some problems, we need to solve, to learn!

2. Dcoker history

In 2010, a group of young people founded dotCloud, an American company

Do some pass cloud computing services! LXC (Linux Container Container) related Container technology!

Linux Container is a kernel virtualization technology that provides lightweight virtualization to isolate processes and resources.

They named their technology (containerization technology) Docker.

Docker did not attract the attention of the industry when it was first extended! DotCloud will not survive!

Open Source 2013, Docker open source!

More and more people are discovering the advantages of Docker! The fire. Docker will be updated once a month!

Docker1.0 was released on April 9, 2014!

Why is Docker so popular? Very lightweight!

Before container technology, we used virtual machine technology!

Virtual machine: install a VMware in Windows, through this software we can virtual out one or more computers! Heavy!

Virtual machine also belongs to virtualization technology, Docker container technology, is also a virtualization technology!

Docker: isolation, image (the most core environment 4m + JDK + mysql) is very small, run the image can be! Small!!! A few M second starts!Copy the code

Docker is based on Go! Open source projects!

Docker website: www.docker.com/

Docker’s documentation is super detailed!

Warehouse: hub.docker.com/

3. What can Docker do?

Compare the differences between Docker and virtual machine technology:

  • Traditional virtual machines (VMS) virtualize a piece of hardware, run a complete operating system, and install and run software on this system

  • Container applications run directly on the host’s content, container is not its own kernel, there is no virtual our hardware, so

Light is the

  • Each container is isolated from each other. Each container has its own file system, which does not affect each other

4.DevOps (Development, operations)

  • Faster delivery and deployment of applications

  • Tradition: a pair of help documents, installation program.

  • Docker: Packaged image release test one-click run.

  • Easier upgrade and capacity expansion

  • With Docker, we deploy the app like building blocks

  • The project is packaged as an image, extending server A! Server B

  • Simpler system operation and maintenance

  • More efficient use of computing resources

Docker is kernel-level virtualization, which can run many container instances on a physical machine! Server performance can be squeezed

To the extreme.

Docker installation

1. Basic composition of Docker

  • Image:

Docker image is like a target that can be used to create container services, tomcat image ==>run==> container

From this image, you can create multiple containers in which the final service or project runs.

  • The container (the container) :

Docker uses container technology to run a single application or group of applications independently, created by mirroring.

Start, stop, delete, basic commands

For now, you can think of this container as a simple Linux system.

  • Warehouse (repository) :

The warehouse is where the images are stored!

Warehouses are divided into public warehouses and private warehouses. (Much like Git)

Docker Hub is foreign.

Ali cloud… Both have container servers (with image acceleration!)

DockerFile

DockerFile build process

Basic knowledge:

1. Each reserved keyword (instruction) must be in uppercase

2. Execute from top to bottom

3. # indicates a comment

4, each instruction will create and submit a new image, and submit!

Dockerfile is development oriented, we want to release the project, do image, you need to write Dockerfile file, this file is very simple

Single!

Docker image gradually become the standard of enterprise delivery, must be mastered!

DockerFile: the build file that defines all the steps, source code

DockerImages: Build the resulting images from a DockerFile and eventually publish and run the product.

Docker containers: Containers are images that run to provide services.

Recommended Learning sites

God said Java