1. Previous versionsyum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate dokcer-logrotate docker-engin Royal docker-ce (ce stands for community edition) yum remove docker-ce docker-ce-cli containerd.io Deleting Docker Resources rm -rf /var/lib/docker 2. Install dependency packagesyum install -y yum-utils 3. Set up the mirror warehouse (the default is the foreign warehouse, which downloads very slowly)yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 4. Update yumyum makecache 5. Install Dockeryum install docker-ce docker-ce-cli containerd.io If you don't want to install the latest version of docker, you can do this: First find out which versions of docker are available yum list docker-ce --showduplicates | sort -r Install the specified version sudo yum install docker-ce-<version_string> docker-ce-cli-<version_string> containerd.io For example, to install version 18.09.1: sudo yum install docker-ce-18.09.1 docker-ce-cli-18.09.1 containerd.io 6. Start Dockersudo systemctl start docker Check whether the startup is successful docker version 7. Automatically start Docker at bootsystemctl enable docker 8. Run the Hellow-world imagesudo docker run hellow-world Docker version information: Run hello-world information: 9. Configure Docker Image AcceleratorApply for a container image service in the Alibaba Cloud console, and then an image accelerator address [https://qiby9901.mirror.aliyuncs.com] will be assigned. If you have not applied for Alibaba Cloud Image Accelerator, do not configure the daemon.json file. The accelerator can only be accessed in the Alibaba Cloud server intranet. Create a daemon.json file in the /etc/docker directory. sudo mkdir -p /etc/docker sudo tee /etc/docker/daemon.json <<-'EOF' { "registry-mirrors": [ "https://qiyb9901.mirror.aliyuncs.com" ] } EOF Save, reload the configuration file and restart Docker sudo systemctl daemon-reload sudo systemctl restart docker 10. Install the docker visual interface management tool portainerdocker run -d -p 8090:9000 --restart=always -v /var/run/docker.sock:/var/run/docker.sock --privileged=true portainer/portainer Note that the docker container port must be 9000 to start portainer Enter http://localhost ip:8090 in the browser address bar to access portainer. The above is a detailed tutorial on how to install Docker on CentOS 8 introduced by the editor. I hope it will be helpful to everyone. I would also like to thank everyone for their support of the 123WORDPRESS.COM website! You may also be interested in:
|
<<: How to let https website send referrer https and http jump referrer
>>: More than 300 lines of CSS code to achieve the explosive special effects of WeChat 8.0
1. Background We do some internal training from t...
Record the installation and configuration method ...
1.command not found command not found 2. No such ...
View Docker Network docker network ls [root@maste...
The importance of data consistency and integrity ...
The traditional method is to write a square in a ...
CocosCreator version: 2.4.2 Practical project app...
Table of contents Asynchronous traversal Asynchro...
1. Introduction to Apache Bench ApacheBench is a ...
1. Introduction: I think the changes after mysql8...
1. Today, when I was making a page, I encountered ...
Table of contents 1. Mathematical functions 2. St...
This article example shares the specific code of ...
Before reading this article, I hope you have a pr...
To view the version and tag of the image, you nee...