centos7 install docker

centos7安裝docker


一、Install using the repository


1. Install required packages. yum-utils provides the yum-config-manager utility, and device-mapper-persistent-data and lvm2 are required by the devicemapper storage driver.

? ? ?yum install -y yum-utils device-mapper-persistent-data lvm2

2.Use the following command to set up the stable repository. You always need the stable repository, even if you want to install builds from the edge or test repositories as well.

? ?yum-config-manager \

--add-repo \

? https://download.docker.com/linux/centos/docker-ce.repo




二、INSTALL DOCKER CE


1.Update the yum package index.

? ?$ sudo yum makecache fast

2.Install the latest version of Docker CE, or go to the next step to install a specific version.

? ?$ sudo yum install docker-ce




三、INSTALL DOCKER CE

1.Update the yum package index.

? ?$ sudo yum makecache fast

2.Install the latest version of Docker CE, or go to the next step to install a specific version.

? ?$ sudo yum install docker-ce

3. Start Docker.

? ?$ sudo systemctl start docker

4.Verify that docker is installed correctly by running the hello-world image.

? ?$ sudo docker run hello-world

最后編輯于
?著作權歸作者所有,轉載或內容合作請聯(lián)系作者
【社區(qū)內容提示】社區(qū)部分內容疑似由AI輔助生成,瀏覽時請結合常識與多方信息審慎甄別。
平臺聲明:文章內容(如有圖片或視頻亦包括在內)由作者上傳并發(fā)布,文章內容僅代表作者本人觀點,簡書系信息發(fā)布平臺,僅提供信息存儲服務。

相關閱讀更多精彩內容

友情鏈接更多精彩內容