2.5. CentOS Docker installation

发布时间 : 2025-10-25 13:32:41 UTC      

Page Views: 9 views

Docker supports the following 64-bit CentOS versions:

  • CentOS 7

  • CentOS 8

  • A higher version.

2.5.1. Use the official installation script to install automatically

The installation commands are as follows:

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun 

You can also use the domestic daocloud one-click installation command:

curl -sSL https://get.daocloud.io/docker | sh 

2.5.2. Manual installation

Uninstall the old version

Older versions of Docker are called docker or docker-engine. If you have installed these programs, uninstall them and related dependencies.

$ sudo yum remove docker \\ docker-client \\ docker-client-latest \\ docker-common \\ docker-latest \\ docker-latest-logrotate \\ docker-logrotate \\ docker-engine 

Install Docker Engine-Community

Use the Docker repository for installation

Before installing Docker Engine-Community on the new host for the first time, you need to set up the Docker repository. You can then install and update Docker from the repository.

设置仓库

Install the required software packages. Yum-utils provides yum-config-manager, and the device mapper storage driver requires device-mapper-persistent-data and lvm2.

$ sudo yum install -y yum-utils \\ device-mapper-persistent-data \\ lvm2 

Use the following command to set up a stable warehouse.

Use the official source address (slow)

$ sudo yum-config-manager \\ --add-repo \\ https://download.docker.com/linux/centos/docker-ce.repo 

You can choose some domestic source addresses:

Ali Yun

$ sudo yum-config-manager \\ --add-repo \\ http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo 

Source of Tsinghua University

$ sudo yum-config-manager \\ --add-repo \\ https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/centos/docker-ce.repo 

Install Docker Engine-Community

Install the latest version of Docker Engine-Community and containerd, or go to the next step to install a specific version:

$ sudo yum install docker-ce docker-ce-cli containerd.io 

If you are prompted to accept the GPG key, select Yes.

有多个 Docker 仓库吗?

If multiple Docker repositories are enabled, installations or updates that do not specify a version in the yum install or yum update command will always install the highest version, which may not suit your stability needs.

The Docker installation is not started by default. And the docker user group has been created, but there are no users under that user group.

要安装特定版本的 Docker Engine-Community,请在存储库中列出可用版本,然后选择并安装:

1、列出并排序您存储库中可用的版本。此示例按版本号(从高到低)对结果进行排序。

$ yum list docker-ce --showduplicates \| sort -r docker-ce.x86_64 3:18.09.1-3.el7 docker-ce-stable docker-ce.x86_64 3:18.09.0-3.el7 docker-ce-stable docker-ce.x86_64 18.06.1.ce-3.el7 docker-ce-stable docker-ce.x86_64 18.06.0.ce-3.el7 docker-ce-stable 

2、通过其完整的软件包名称安装特定版本,该软件包名称是软件包名称(docker-ce)加上版本字符串(第二列),从第一个冒号(:)一直到第一个连字符,并用连字符(-)分隔。例如:docker-ce-18.09.1。

$ sudo yum install docker-ce- docker-ce-cli- containerd.io    

Start Docker.

$ sudo systemctl start docker 

Verify that Docker Engine-Community is installed correctly by running the hello-world image.

$ sudo docker run hello-world 

Uninstall docker

Delete the installation package:

yum remove docker-ce 

Delete images, containers, configuration files, etc.:

rm -rf /var/lib/docker 
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。