1. Mind Map 2. How to build a container 2.1 Preparing the experimental environment (1) Environmental selection Management tool: Docker engine, because Docker is the most popular and widely used; runtime: runc. The default runtime for Docker. Operating system: Ubuntu. Although there are container OSs like CoreOS, it is recommended to use the familiar system Ubuntu when you are just starting to learn. (2) Install Docker (2.1) Docker official tutorial: docs.docker.com/engine/installation (2.2) Configure Docker's apt source: ①Install the package and allow apt command HTTPS to access the Docker source; ②Add Docker's official GPG key; ③Add the Docker source to /etc/apt/sources.list (2.3) Install Docker in Ubuntu First, you need to verify whether Ubuntu supports Docker: Docker requires Ubuntu kernel version 3.10 or higher. Check the prerequisites on this page to verify whether your Ubuntu version supports Docker. ①Replace the Ubuntu official source with the domestic Alibaba source vi /etc/apt/sources.list deb http://mirrors.aliyun.com/ubuntu/ xenial main deb-src http://mirrors.aliyun.com/ubuntu/ xenial main deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main deb http://mirrors.aliyun.com/ubuntu/ xenial universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial universe deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates universe deb http://mirrors.aliyun.com/ubuntu/ xenial-security main deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security universe ②Update source: ③Repair the damaged software package, uninstall the erroneous package, and reinstall the correct version. ④Update software ⑤Install the required packages: ⑥Add the GPG key and add the Docker-ce software source. Here we take the Docker-ce source of the University of Science and Technology of China as an example: curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu \ $(lsb_release -cs) stable" ⑦Update the package cache after adding successfully: ⑧Install Docker-ce: ⑨ Set the boot-up auto-start and start Docker-ce (it has been set and started by default after successful installation and can be ignored): sudo systemctl enable docker sudo systemctl start docker ⑩Add the current user to the docker user group so that docker can be run without sudo. sudo groupadd docker sudo usermod -aG docker $USER test: ⑪Start the docker service: Test run: $ docker run ubuntu:15.10 /bin/echo "Hello world" docker: The Docker binary. run: Combined with the previous docker to run a container. ubuntu:15.10 specifies the image to run. Docker first checks whether the image exists on the local host. If it does not exist, Docker downloads the public image from the image repository Docker Hub. /bin/echo "Hello world": command executed in the started container PS: When running docker as a non-root user in ubuntu, an error will be reported. You need to execute the following command first: Order!!! 2.2 Run the first container Summarize The above is the introduction of Ubuntu Docker installation in vmware by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: MySQL full-text index to achieve a simple version of the search engine example code
>>: How to implement property hijacking with JavaScript defineProperty
1. If the user has the create routine permission,...
I want to use the marquee tag to set the font scro...
1. Environment and preparation 1. Ubuntu 14.04 2....
This article mainly introduces the wonderful use ...
Table of contents 1. Run workflow 2. Basic comman...
Table of contents JavaScript Objects 1. Definitio...
Table of contents 1. Some concepts you need to un...
Tomcat is an HTTP server that is the official ref...
This article example shares the specific code of ...
1. Purchase a server In the example, the server p...
This article mainly introduces the case of Vue en...
Table of contents 1. Usage of keep-alive Example ...
The so-called container actually creates a readab...
This article shares the specific code of JavaScri...
1. Introduction to KVM The abbreviation of kernel...