日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > windows >内容正文

windows

CentOS系统下docker的安装与卸载

發布時間:2024/1/17 windows 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 CentOS系统下docker的安装与卸载 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Docker簡介

Docker?是一個開源的應用容器引擎,讓開發者可以打包他們的應用以及依賴包到一個可移植的容器中,然后發布到任何流行的?Linux?機器上,也可以實現虛擬化。容器是完全使用沙箱機制,相互之間不會有任何接口(類似 iPhone 的 app)。幾乎沒有性能開銷,可以很容易地在機器和數據中心中運行。最重要的是,他們不依賴于任何語言、框架包括系統。?
前提

首先,你的Centos的系統一定要是64位的,不管版本是什么。并且內核版本至少是3.10以上。?
用以下命令去查看你的內核版本:

$ uname -r 3.10.0-229.el7.x86_64

最后,建議你更新你的系統,因為最新內核可能會修復了舊版本的一些bug。

安裝

用yum安裝

用具有sudo或者root權限的用戶登錄系統。

確保你的yum包已經更新

$ sudo yum update

添加yum倉庫

$ sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' [dockerrepo] name=Docker Repository baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/ enabled=1 gpgcheck=1 gpgkey=https://yum.dockerproject.org/gpg EOF

安裝Docker包

$ sudo yum install docker-engine
  • 開啟docker deamon
$ sudo service docker start

驗證docker是否成功安裝

$ sudo docker run hello-world Unable to find image 'hello-world:latest' locallylatest: Pulling from hello-worlda8219747be10: Pull complete91c95931e552: Already existshello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd1.7.1cf5daeb82aab55838dStatus: Downloaded newer image for hello-world:latestHello from Docker.This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(Assuming it was not already locally available.)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashFor more examples and ideas, visit:http://docs.docker.com/userguide/

開機自啟動

$ sudo chkconfig docker on

卸載

列出你安裝過的包

$ yum list installed | grep docker yum list installed | grep docker docker-engine.x86_64 1.7.1-1.el7 @/docker-engine-1.7.1-1.el7.x86_64.rpm

刪除安裝包

$ sudo yum - y remove docker-engine.x86_64

刪除鏡像/容器等

$ rum -rf /var/lib/docker

詳情請參閱:官網教程

轉載于:https://www.cnblogs.com/beautiful-code/p/6245528.html

總結

以上是生活随笔為你收集整理的CentOS系统下docker的安装与卸载的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。