Today, when I learned of the docker, with docker install nginx time reported the following error:
Tried to uninstall docker reload, delete nginx, nginx delete the image files to no avail, and finally found docker or Linux version compatibility issues.
1. Check your current kernel version
uname -r
1
2, yum update package
sudo yum update
1
3, unloading docker installed (if installed, then)
yum remove docker docker-common docker-selinux docker-engine
1
4, install the required packages
sudo yum install -y yum-utils device-mapper-persistent-data lvm2
1
5, the source provided yum
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
1
6, you can view all versions of all warehouse docker, and select a specific version is installed
yum list docker-ce --showduplicates | sort -r
1
7. Reinstall docker
sudo yum install docker-ce
1
8, start docker
sudo systemctl start docker
1
9, verify that the installation was successful
docker virsion // check the version of docker
docker ps // view the currently running container
1
2
10, delete the original container packed nginx (if installed)
docker rm nginx (vessel name or id)
1
11, delete the image file nginx
docker images // View image files
docker rmi nginx // delete nginx Mirror
docker rmi -f nginx nginx forced to delete the mirror
1
2
3
12, reload and start nginx
docker run --name nginx -d -p 80:80 nginx
1
13, the installation is successful, the test is successful
————————————————
Disclaimer: This article is CSDN blogger, "I can work overtime." Original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
Original link: https: //blog.csdn.net/weixin_44868863/article/details/91409710
Today, when I learned of the docker, with docker install nginx time reported the following error: trying to uninstall docker reload, delete nginx, nginx delete the image files to no avail, and finally found docker or Linux version compatibility issues.
1. Check your current kernel version
uname -r12, yum update package
sudo yum update13, unloading docker installed (if installed then)
yum-the Remove the Common docker docker docker docker-SELinux-engine14, install the required packages
sudo yum install -y yum-utils device-mapper -persistent-data lvm215, yum source disposed
sudo yum-config-manager --add- repo https://download.docker.com/linux/centos/docker-ce.repo16, can View all docker versions of all the warehouse, and select a particular version installed
yum list docker-ce --showduplicates | sort -r17, reinstall docker
sudo yum install docker-CE18, start docker
whether sudo systemctl start docker19, verify that the installation was successful
docker virsion / / View docker version docker ps // View container 1210 are currently running, delete the original container packed nginx (if installed)
docker RM nginx (vessel name or id) 111, delete the image file nginx
docker images // view the image file docker rmi nginx // delete nginx mirror docker rmi -f nginx nginx force the removal of the mirror 12312, reload and start nginx
Docker RUN --name nginx -d -p 80:80 nginx113, the installation is successful, the test success ---------------- Disclaimer: This article is CSDN blogger original article, "I can work overtime", follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. Original link: https: //blog.csdn.net/weixin_44868863/article/details/91409710