CentOS6.4安裝Docker


首先,須要安裝EPEL倉庫

# wget http://mirrors.yun-idc.com/epel/6/i386/epel-release-6-8.noarch.rpm
# rpm -ivh epel-release-6-8.noarch.rpm

安裝docker-io

# yum -y install docker-io

啟動docker服務

# /etc/init.d/docker start
Starting cgconfig service:                                 [  OK  ]
Starting docker:                                           [  OK  ]

設置docker服務開機啟動

# chkconfig docker on

測試是否正常工作

# docker run -i -t fedora /bin/bash
Unable to find image 'fedora' locally
fedora:latest: The image you are pulling has been verified

bfe0bb6667e4: Downloading  6.48 MB/259.4 MB 51m9s
511136ea3c5a: Already exists 
00a0c78eeb6d: Already exists 

下載中,因為網速原因,等待比較長一段時間后

# docker run -i -t fedora /bin/bash
Unable to find image 'fedora' locally
fedora:latest: The image you are pulling has been verified

bfe0bb6667e4: Pull complete 
511136ea3c5a: Already exists 
00a0c78eeb6d: Already exists 
Status: Downloaded newer image for fedora:latest
bash-4.3#

能夠看出我們已經執行在docker容器中了

能夠像Fedora一樣操作了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM