In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Uninstall the old version
Older versions of Docker are called docker or docker-engine. If you have installed these, uninstall them and related dependencies. Yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
If yum reports that these packages are not installed, that's fine.
/ var/lib/docker/ retains content including images, containers, volumes and networks, and has to delete everything in this directory.
Install the epel source (it is recommended to install it before installing docker)
Epel feeds on yum install epel-release # Ali
Install dcker
1. Install the required packages. Yum-utils provides yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by devicemapper storage drivers.
Yum install-y yum-utils device-mapper-persistent-data lvm2
two。 Using the following command to set up the stable repository is also called importing the mirror source configuration file.
Yum-config-manager-add-repo https://download.docker.com/linux/centos/docker-ce.repo (official mirror source files are used here)
3. Enable nightly and test repositories
These repositories are included in the files above docker.repo, but are disabled by default and are enabled along with the stable repository.
Enable the nightly repository command:
Yum-config-manager-enable docker-ce-nightly
To enable the test channel, run the following command:
Yum-config-manager-enable docker-ce-test
4. Install the latest versions of Docker CE and containerd
Yum install docker-ce docker-ce-cli containerd.io
5. Start docker and run docker run hello-world to verify that the installation is successful
Systemctl start docker
Verify that Docker is installed correctly by running the hello-world image
Docker run hello-world
This command downloads the test image and runs it in the container. When the container runs, it prints an informational message and exits.
Note: yum installation container-selinux general yum source can not find this package
Need to install epel source to yum install container-selinux
And then install docke-ce.
Ali's yum source profile wget-O / etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
Epel feeds on yum install epel-release # Ali
And then yum install container-selinux
To install docker-compose, install pip first.
Yum install python-pip
Pip install docker-compose
Note:
1. If the following error occurs, prompt x509: the certificate has expired or is not yet valid. Is the system time error. Just synchronize the network time. Synchronize network time command: ntpdate 0.cn.pool.ntp.org
Docker: error pulling image configuration: Get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/fc/fce289e99eb9bca977dae136fbe2a82b6b7d4c372474c9235adc1741675f587e/data?verify=1553240077-fVlr4dC%2BE7NTmimUsnS8MY7s04k%3D: x509: certificate has expired or is not yet valid.
Docker: error pulling image configuration: get https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/fc/fce289e99eb9bca977dae136f2a82b6b7d4c3727474c9235adc1741675f587e/data? Verify=1553240077-fvlr4dc%2be7ntmimuss8my7s04k%3d:x509: the certificate has expired or is not yet valid.
two。 When yum installs docker, the error report of errno 12 is a network timeout error. When downloading, the company network is unstable or the network is slow when downloading to the origin server. Just change the yum source to Ali image. Yum-config-manager-- add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
3. When you change the rpm installation after the yum installation fails, the selinux package will conflict with the already installed dependent packages.
Follow the prompts to force the uninstall. Uninstall command rpm-e package name-- nodeps
4. When installing docker using Ali's docker-repo source in centos 7.6, it may be reported that there is no corresponding installation package in the image. The solution is to download docker's rpm installation package and install it manually. Or use the official docker-repo to reinstall it according to the above steps.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.