1. 程式人生 > >Linux安裝docker

Linux安裝docker

1> linux安裝docker:
1.1> 檢查核心版本: uname -r 返回的值大於3.10即可
1.2> yum update 確保yum為最新
1.3> yum install docker 安裝docker
1.4> systemctl start docker 啟動docker
1.5> systemctl status docker / ps -ef|grep docker 檢視docker狀態
1.6> systemctl enable docker 設定docker開機啟動

2> 離線包安裝docker:
1> 下載rpm包

https://download.csdn.net/download/qq_17522211/10807537
2> rpm -ivh lxc-libs-1.0.9-1.el6.x86_64.rpm
rpm -ivh lua-alt-getopt-0.7.0-1.el6.noarch.rpm
rpm -ivh lua-filesystem-1.4.2-1.el6.x86_64.rpm
rpm -ivh lua-lxc-1.0.9-1.el6.x86_64.rpm
rpm -ivh lxc-1.0.9-1.el6.x86_64.rpm
rpm -ivh docker-io-1.7.1-2.el6.x86_64.rpm
rpm -ivh device-mapper-libs-1.02.117-12.el6.i686.rpm --force --nodeps
rpm -ivh device-mapper-libs-1.02.117-12.el6.x86_64.rpm --force --nodeps
3> 啟動docker:
service docker start
4> 檢視docker:
docker ps
5> 設定開機啟動:
chkconfig docker on