使用Docker离线安装包安装Docker

[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

限制

  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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值