An overview of the
Windows docker installation has version restrictions on the system, because my computer does not support it, so I install the VIRTUAL machine of Centos8 and explore the use of Docker on the virtual machine.
Vm Installation
Download address: isoredirect.centos.org/centos/8/is…
Mirror: = = CentOS – 8.3.2011 – x86_64 – dvd1. Iso = =
Select network Settings of ==NAT== to facilitate communication between the local machine; The rest of the configuration is installed as default.
Wait some time for the VIRTUAL machine installation to complete
The default root password is the same as that of the newly created user
Vm Settings
Disabling the Firewall
Service # Firewall status systemctl stop firewald. service # Stop systemctl start firewald. service # Start firewald. service Systemctl disable firewalld. Service systemctl enable firewalld. ServiceCopy the code
Static IP Settings
Switch to user root
vi /etc/sysconfig/network-script/ifcfg-ens33
Copy the code
The configuration file has the following two changes
BOOTPROTO=static # change this configuration IPADDR= static IP[open vm - edit - virtual network editor - corresponding subnet address]Copy the code
Nic to restart
systemctl restart network #centos7
systemctl restart NetworkManager #centos8
Copy the code
Test the network:
ping baidu.com
Copy the code
Configuring a Shared Disk
Vm Settings – Options – Shared Folder – Add host path
How to troubleshoot the problem that vmware16.0.0 does not install a shared directory on a vm
Blog.csdn.net/bafeiyu2523…
After replacing the network processing method reference article: www.cnblogs.com/abel-he/p/1…
Sudo vmhgfs-fuse. host:/ / MNT/HGFS If the directory is not empty, run sudo VMHGFS -fuse. host:/ / MNT/HGFS / -o allow_other -o uid=1000 -o nonemptyCopy the code
Docker installation
precondition
1. Prerequisites (1) Kernel 3.8 Or later, you can run the uname -a command to check the kernel version
2. Prerequisites (2) Check whether the Device Mapper is installed
Ls -l /sys/class/misc/device-mapper sudo grep device-mapper /proc/mapper # yum install -y Device-mapper sudo modprobe dm_mod device-mapper sudo modprobe Ls -l /sys/class/misc/device-mapper #Copy the code
Install the docker
The official documentation address: docs.docker.com/engine/inst… The W3C: www.runoob.com/docker/cent…
Sudo yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ Docker-latest logrotate docker-logrotate docker-engine docker-ce docker-ce cli containerd. IO #yum install sudo yum Install -y yum-utils #yum install sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo # enable repository at night, Disable sudo yum-config-manager --enable docker-ce-test # enable sudo yum-config-manager --enable docker-ce-test # disable sudo yum-config-manager --enable docker-ce-test # enable sudo yum-config-manager --enable docker-ce-test # Sudo yum install docker-ce docker-ce-cli containerd. IO # sudo systemctl start docker # sudo yum install docker-ce systemctl enable dockerCopy the code
Share a RPM package source address: docker-release-yellow-prod.s3-website-us-east-1.amazonaws.com/linux/cento…
Docker-compose image installation
# download sudo curl - L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname - s) - $(uname -m)" - o For example, /usr/local/bin/docker-compose is an example of a docker-compose file that can be downloaded from /usr/local/bin/docker-compose Docker-compose /usr/local/bin/docker-compose /usr/bin/docker-composeCopy the code
Docker orchestrates file repositories
Contains the following environments
- Php74 environment (rebaitMq, directing, swoole, closer to the rabbitmq extension)
- kafka
- zookeeper
- rabbitmq
- elasticsearch
- kibana
Address: gitee.com/lean_in/doc…
Start multiple Docker containers
Go to the docker_config root directory
Docker rm -f [docker name] # restart docker rm -f [docker name] # restart docker rm Restart [container name]Copy the code