亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

centos7支持docker嗎?

centos7支持docker嗎?

天涯盡頭無女友 2019-02-15 15:11:07
centos7支持docker嗎
查看完整描述

2 回答

?
神不在的星期二

TA貢獻1963條經驗 獲得超6個贊

在centos7上我們可以通過yum來安裝docker1.確保你擁有管理員權限,需要可以使用sudo或者root的命令的權限。2.需要將你的yum的包升級到最新的狀態。sudoyumupdate3.為你的yum添加一個repo文件。在centos7下面您可以直接運行下面的代碼。cat>/etc/yum.repos.d/docker.repo<<-EOF[dockerrepo]name=DockerRepositorybaseurl=pleteStatus:Downloadednewerimageforhello-world:latestHellofromDocker.Thismessageshowsthatyourinstallationappearstobeworkingcorrectly.Togeneratethismessage,Dockertookthefollowingsteps:1.TheDockerclientcontactedtheDockerdaemon.2.TheDockerdaemonpulledthe"hello-world"imagefromtheDockerHub.3.TheDockerdaemoncreatedanewcontainerfromthatimagewhichrunstheexecutablethatproducestheoutputyouarecurrentlyreading.4.TheDockerdaemonstreamedthatoutputtotheDockerclient,whichsentittoyourterminal.Totrysomethingmoreambitious,youcanrunanUbuntucontainerwith:$dockerrun-itubuntubashShareimages,automateworkflows,andmorewithafreeDockerHubaccount:/userguide/如果看到這樣的命令就說明hello-world的鏡像安裝好了。這個時候我們再鍵入servicedockerstart就會提示Startingdocker(viasystemctl):[OK]說明我們的docker已經正常的在centos上運行了。




查看完整回答
反對 回復 2019-03-04
?
慕仙森

TA貢獻1827條經驗 獲得超8個贊

你好,方法如下:
1、Docker 軟件包已經包括在默認的 CentOS-Extras 軟件源里,需要配置好yum源,

2、安裝docker命令如下: yum -y install docker,

3、安裝完成后,使用下面的命令來啟動 docker 服務

4、下載官方的 CentOS 鏡像到本地 ,docker pull centos

5、搜索可用的docker鏡像,下載成功

6、在docker容器中安裝新的程序,命令docker run -ubuntu
apt-get install -y ping

7、在容器中用命令ping,發現測試可以使用



查看完整回答
反對 回復 2019-03-04
  • 2 回答
  • 0 關注
  • 936 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號