Micro Services Architecture Foundation - use of Docker
Experimental and requirements
Master the use of dockerfile
Common usage instructions grasp docker
Docker master image management
lab environment
Install Ubuntu
Installation docker
A, Docker entry procedures
1, write Dockerfile file
2, the preparation of an external file requirements.txt and app.py
3, create a mirror
4, to view mirror
5, create and launch container
6, view the running container
7, access to the program, view the results
8, stop the container
Two, Docker customers frequently used instructions
1, lists the mirror
2, Search Mirror
3, pulling the mirror
Pull the specified version
4, the mirror Construction
4.1 Construction of the mirror in the directory where the file dockerfile
4.1 Construction of a mirror in a different directory
5, view mirror, and remove a mirror
6, create and launch container
7, listed container
8, execute the command
9, the container is stopped, and respectively use the stop ki
10, the container starts, start and restart respectively, using
11, remove the container
Forced to delete
delete all
Three, Docker image management
1. Log Docker Hub
2, modify the name of the mirror
3, login authentication
4, push mirror
5, page view docker Hub
6, docker reegistry local private warehouse building
6.1 Starting docker reegistry
6.2 Renaming a mirror
6.3 Push mirroring
6.4 for viewing in the host browser
6.5 is mapped to the local disk to view it
7, docker reegistry local private warehouse configuration
7.1 View docker reegistry private warehouse building address
7.2 generates a self-signed certificate
7.3 generation user name and password
7.4 Starting Docker Registry local mirror warehousing services
7.5 Configuring docker reegistry access interface
7.6 Verification Test
7.6.1 docker reegistry private warehouse registration
7.6.2 restart docker process
7.6.3 ready image file
7.6.4 Push mirroring
7.6.5 Log docker reegistry mirror warehouse
7.6.6 to see if the local push success
Learn a trick: Docker accelerator configuration
Personal summary
By this experiment I summarized as follows:
在Ubuntu里面编辑配置文件特别困难,首先配置桥接模式,然后连接Xshell工具,这样编辑配置文件的出错率就降低了。在做实验过程中细心是关键,比如创建镜像名和拉取镜像名必须一致,不然就会拉取失败。