[toc]
使用Docker离线安装包安装Docker
环境
操作系统
[root@localhost ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[root@localhost ~]# cat /proc/version
Linux version 3.10.0-123.el7.x86_64 (builder@kbuilder.dev.centos.org) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Mon Jun 30 12:09:22 UTC 2014
[root@localhost ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
Docker
[root@localhost ~]# docker -v
Docker version 1.13.1, build 0be3e21/1.13.1
限制
- 内核版本必须在3.10以上
开始
解压自制yum源
tar -xzvf yum.tar
将本机yum源位置指向自制yum源位置
cp -r /etc/yum.report.d /etc/yum.report.d.bak
cd /etc/yum.report.d
rm -rf *
touch CentOS-Base.repo
vi CentOS-Base.repo
yum clean all
yum makecacke
-- CentOS-Base.repo修改结果如下
cat CentOS-Base.repo
[my]
name=my
baseurl=file:/tmp/temp/yum
gpgcheck=0
enabled=1
安装
yum install -y yum-utils device-mapper-persistent-data lvm2 createrepo docker
docker -v
[root@localhost ~]# docker -v
Docker version 1.13.1, build 0be3e21/1.13.1