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
Table of contents Dockerfile pom.xml Jenkins Conf...
Table of contents 1. Communication between father...
Table of contents Preface use Component Writing D...
In MySQL, the LOAD_FILE() function reads a file a...
This article example shares the specific code of ...
Table of contents 1. The reason why the limit is ...
This article shares the specific code for JavaScr...
To install a virtual machine on a Windows system,...
In MySQL, databases correspond to directories wit...
This article uses examples to describe the manage...
Download the rpm installation package MySQL offic...
We all know that the performance of applications ...
mysql between boundary range The range of between...
The action of the form is different from the URL j...
This article briefly introduces how to install My...