Article directory
Day01~Basic application of Docker technology
core knowledge points
- The background of the birth of Docker (there are more services, maintenance is difficult)
- Docker platform basic architecture (Client/Server, refer to the official architecture diagram)
- Docker platform core objects (image-image, container-Container)
- Docker platform installation (online installation on CentOS system, offline installation)
- Basic operations of Docker services (status,start,stop,restart,enable,disable,docker info,docker -v)
- Docker image (Image) basic operations (pull, images, rm, save, load, inspect, history, ...)
- Docker container basic operations (run, ps, ps -a, stop, start, restart, exec, logs, exit, rm, rm -f, prune)
- Data management in Docker (data volume-volume, direct directory mount)
- Image creation under Docker platform (file system ~ software + Dockerfile, build)
Analysis of common problems
- What is Docker? (Virtual engine, containerization technology platform, creating images based on docker, starting containers)
- What problem is Docker used to solve? (Simplify deployment - e.g. sentinel images, operations, improve maintainability of its services)
- What is the basic architecture of Docker? (Client/Server, pull, run, build are all client-side instructions, and requests are made to the docker service through these instructions)
- What are the core objects in Docker? (Image/Container/…)
- How to understand the image (Image) in docker? (A set of file system, which is static, needs to be put into the container to run. Similar to a jar package, it needs to be interpreted and executed by the JVM)
- How to understand the container (Container) in Docker? (A process with independent namespace, container isolation through namaspace)
- What data volume, why use data volume, how to use data volume?
- Why do we make our own mirrors? What are the steps to create an image?
- What is the role of Dockerfile?
Common Bug Analysis
- The virtual machine system does not have an ip address?
Option 1: Modify the configuration in vmvare
Option 2: Check whether the following services in vmvare are started, if not, start the service and reopen vmvare.
- When the container is using an image, the image cannot be deleted, for example
- Do not use docker commands inside containers, for example:
- Docker container entry fails, for example:
- The capitalization of the Dockerfile and the incompleteness of the file content (note that when copying, the words should be copied completely)
- The container already exists, but it needs to be created again, pay attention to the repeated name. (Maybe you have created this container, but the startup failed)
after class homework
- Summarize the knowledge points in the class
- Proficient in Docker platform, images, and common container instructions
- Familiar with data operations under Docker, the production of image files (jdk: 8, sentinel: 8), etc.
- Preview the installation of common image software under the Docker platform (such as mysql, redis, etc.)
Day02~Common image startup under Docker platform
core knowledge points
- Start Mysql image, Redis image, Nginx image, Nacos image under the Docker platform.
- The interconnection (virtual network network) between containers under the Docker platform.
Analysis of common problems
- How to run common image files based on docker? (MySql, Redis, Nginx, Naocs, etc.)
- How to view container startup or running logs? (docker logs container id)
- What should I do if I want to enter the container again after exiting the container? (First, docker ps to check whether the container is running, if it is not running, start it)
- How to realize container interconnection? (Based on the host, establish a virtual network)
Common Bug Analysis
- The container already exists, but it needs to be created again, pay attention to the repeated name. (Maybe you have created this container, but the startup failed)
- If there are containers using this image, the image cannot be deleted.
- The docker run operation is performed based on the image, but the running container cannot be seen through docker ps? (container log is required)
- No Datasource Set?
- Connection refused, e.g.
after class homework
- Summarize the content of the class
- Complete the download and startup of common mirrors
- Summarize all instructions in the Docker stage (docker, image, container, volume, network, ...)
- Preview the relevant content of the redis chapter (learn about the development history of redis)
- WeChat: strong1698, write center + class + name when adding WeChat