CentOS下安裝docker,docker-compose

一、查看系統發行版本:docker

lsb_release -a

二、安裝docker:Docker 是一個開源的應用容器引擎,能夠讓開發者打包他們的應用以及依賴包到一個輕量級、可移植的容器中,而後發佈到任何流行的 Linux 機器上。curl

curl -fsSL https://get.docker.com/ | sh(腳本安裝)工具

yum -y install docker-io(從鏡像源中安裝,及時更新yum源)url

建議使用腳本安裝spa

三、安裝docker-compose:Docker-Compose是一個部署多個容器的簡單可是很是必要的工具.code

pip install docker-composeblog

安裝時報錯:Cannot uninstall 'requests'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.ip

解決辦法:執行:pip install docker-compose --ignore-installed requests開發

四、檢查docker-compose版本:部署

docker-compose -version

五、檢查docker版本:

docker -v   或者 docker version

相關文章
相關標籤/搜索