在redhat6上装1.8以下的docker
因为目前1.8以上的docker最低要求是3.10的Linux内核,而我的内核版本远低于此。
[root@localhost home]# uname -r
2.6.-754.11..el6.x86_64
鉴于我的vm上有一堆的dependency,并且没有太多的时间来把内核升级,所以只能咬牙在redhat6的环境下装docker,先把不能把代码mount到另外一台ubuntu上跑unittest这个事情给解决了(这里我想吐槽管杀不管埋的IT一百遍)。
docker主要依赖于CE(社区版,一般已经很够用了),它的主要依赖包如下:(这个是1.7版本的,从网上看到的)
lxc-libs-1.0.-.el6.x86_64.rpm
lua-alt-getopt-0.7.-.el6.noarch.rpm
lua-filesystem-1.4.-.el6.x86_64.rpm
lua-lxc-1.0.-.el6.x86_64.rpm
lxc-1.0.-.el6.x86_64.rpm
docker-io-1.7.-.el6.x86_64.rpm device-mapper-libs-1.02.-.el6.i686.rpm
device-mapper-libs-1.02.-.el6.x86_64.rpm
但是我想用yum下载并安装,所以为了以防万一,我先装了个epel-release。EPEL (Extra Packages for Enterprise Linux)是基于Fedora的一个项目,为“红帽系”的操作系统提供额外的软件包,适用于RHEL、CentOS和Scientific Linux.
[root@localhost Downloads]# yum -y install epel-release
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
5 epel | 4.7 kB :
itaas | 2.0 kB :
itaas-extras | 1.8 kB :
itaas-optional | 2.0 kB :
itaas-supplementary | 2.0 kB :00
Setting up Install Process
Package epel-release--.noarch already installed and latest version
Nothing to do
安装成功后,yum的源可以看到
[root@localhost Downloads]# yum repolist
2 Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
3 Updating certificate-based repositories.
Unable to read consumer identity
repo id repo name status
epel Extra Packages for Enterprise Linux - x86_64 ,
itaas itaas ,
itaas-extras itaas extras yum repo
itaas-optional itaas optional yum repo ,997
itaas-supplementary itaas supplementary yum repo repolist: ,
查找docker相应的依赖包
[root@localhost etc]# yum search docker
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
Updating certificate-based repositories.
Unable to read consumer identity
============================================================================================== N/S Matched: docker ===============================================================================================
docker-io-fish-completion.x86_64 : fish completion files for docker
docker-io-logrotate.x86_64 : cron job to run logrotate on docker containers
docker-io-vim.x86_64 : vim syntax highlighting files for docker
docker-io-zsh-completion.x86_64 : zsh completion files for docker
fedora-dockerfiles.x86_64 : Example dockerfiles to assist standing up containers quickly
golang-github-docker-libtrust-unit-test.x86_64 : Unit tests for golang-github-docker-libtrust package
golang-github-docker-spdystream-unit-test.x86_64 : Unit tests for golang-github-docker-spdystream package
golang-github-fsouza-go-dockerclient-devel.noarch : Client for the Docker remote API
golang-github-fsouza-go-dockerclient-unit-test.x86_64 : Unit tests for golang-github-fsouza-go-dockerclient package
imagefactory-plugins-Docker.noarch : Cloud plugin for Docker
python-docker-py.x86_64 : An API client for docker written in Python
python-docker-registry-core.noarch : Core package for docker-registry (drivers) developers
python-dockerfile-parse.noarch : Python library for Dockerfile manipulation
docker.x86_64 : KDE and GNOME2 system tray replacement docking application
docker-io.x86_64 : Automates deployment of containerized applications
docker-io-devel.x86_64 : A golang registry for global request variables (source libraries)
golang-github-docker-libcontainer.x86_64 : Configuration options for containers
golang-github-docker-libcontainer-devel.x86_64 : Configuration options for containers
golang-github-docker-libtrust-devel.noarch : Library for managing authentication and authorization
golang-github-docker-spdystream-devel.noarch : A multiplexed stream library using spdy Name and summary matches only, use "search all" for everything.
安装docker必须的依赖包,以为有些依赖包之间也存在依赖关系,所以有些装完,被依赖的包也就顺便一起装了。
[root@localhost etc]# yum install -y docker
[root@localhost etc]# yum install -y lua-lxc.x86_64
[root@localhost etc]# yum install -y lxc.x86_64
[root@localhost8 etc]# yum install -y docker-io.x86_64
[root@localhost etc]# yum install -y device-mapper-libs.i686
[root@localhost etc]# yum install -y device-mapper-libs.x86_64
然后把docker的service打开,确认docker是否装上了
[root@localhost docker]# service docker start
Starting docker: [ OK ]
[root@localhost docker]# docker info
这里需要注意一下,因为是redhat6,所以只有service,没有systemctl。这里还关系到另外一个问题,就是尽量不要把docker的存储位置迁移。
目前网上所教的方法,有如下几种:
1. 是把/var/lib/docker整个路径下的文件都拷贝到其他位置,然后再软链接回来。
2.是把/var/lib/docker整个路径下的文件都拷贝到其他位置,然后修改docker.service,
- --graph=/data/docker:docker新的存储位置
- --storage-driver=overlay : 当前docker所使用的存储驱动
虽然这俩方法都挺好的,但是redhat6的service写法于redhat7不同,并且我们这里装的docker版本比较低,软链接回来,有些路径依旧不对,docker pull会不起作用,并且明面上不会有报错。所以最好不迁移。
在redhat6上装1.8以下的docker的更多相关文章
- .Net Core+cenos7+Docker+Dockerfile 部署实践
因为这段时间比较忙,同时也在抽时间将开发框架转移到 .net Core 上 所以写博客的时间就少了,这次我利用dockerfile成功将.net Core程序部署到了cenos7容器中,特抽时间把我的 ...
- 会用Docker的人都别装了,这多简单呐
学术又官方的说法 Docker 是一个开源的应用容器引擎,让开发者可以打包他们的应用以及依赖包到一个可移植的容器中,然后发布到任何流行的Linux机器或Windows 机器上,也可以实现虚拟化,容器是 ...
- 一张关于docker版本的图
今天安装了windows内测版的docker,的确是是把vitualbox换成了hyper-v,如左图,server的os 还是linux.不过之前在nanoserver上装的docker 也的确是原 ...
- docker nginx1.7.6+keepalived实现双机热备
0.前提条件 环境两台ubuntu版本14.04 64位系统(并获取root权限) 假设两台服务器ip为:172.16.34.214(master),172.16.34.215(backup),kee ...
- Docker是什么
Docker是什么 相信我们很多人都使用多VM(Virtual Machine),也就是虚拟机,简单的来说Docker就是类是于VM的容器,但Docker要轻量得多,VM(Virtual Machin ...
- Docker个人学习总结
最近一段时间学习了下Docker,关于Docker的安装,运用什么的在这里我不会过多的说明,我只说我对于Docker的一些理解,附加我用于记录的少量代码. 刚开始学习Docker的时候,找资料在网上看 ...
- 给一个正在运行的Docker容器动态添加Volume
给一个正在运行的Docker容器动态添加Volume本文转自:http://dockone.io/article/149 [编者的话]之前有人问我Docker容器启动之后还能否再挂载卷,考虑到mnt命 ...
- Docker学习计划
刚开始学习Docker的时候,找资料在网上看到最多的是Docker的好处.比如: 1.Docker 容器的启动可以在秒级实现,这相比传统的虚拟机方式要快得多 2.Docker 对系统资源的利用率很高, ...
- 用Docker在一台笔记本电脑上搭建一个具有10个节点7种角色的Hadoop集群(上)-快速上手Docker
如果想在一台电脑上搭建一个多节点的Hadoop集群,传统的方式是使用多个虚拟机.但这种方式占用的资源比较多,一台笔记本能同时运行的虚拟机的数量是很有限的.这个时候我们可以使用Docker.Docker ...
随机推荐
- 浅谈jQuery宽高及其应用
[前言] 今天讲了讲jQuery各种元素宽高的获取和设置,下面简单总结下,希望对各位小伙伴有所帮助 [主体] 补充知识点: (1)width()返回结果无单位,css("width" ...
- defer, panic, recover使用总结
1. defer : 延迟调用.多个defer,依次入栈,在函数即将退出时,依次出栈调用 package main import "fmt" func main() { defer ...
- java折半插入排序
代码如下: public class BinaryInsertSort { public static void binaryInsertSort(DataWrap [] data) { System ...
- 获取springbean的几种方式
首先我说一下我遇到的问题,再项目初始化时候,spring容器初始化前要执行的操作中使用到了bean去做一些增删改查操作,这样做是不能自己使用springbean的数据源去操作的,所以需要动态获取spr ...
- django的时间问题
三个时间datetime.datetime.now().datetime.datetime.utcnow()与django.util.timezone.now()的区别 datetime.dateti ...
- Python中的@property装饰器
要了解@property的用途,首先要了解如何创建一个属性. 一般而言,属性都通过__init__方法创建,比如: class Student(object): def __init__(self,n ...
- Codeforces 918C/917A - The Monster
传送门:http://codeforces.com/contest/918/problem/C 一个括弧串由字符‘(’和‘)’组成.一个正确的串可被递归地定义,定义如下: ①空串e是一个正确的串: ② ...
- 公钥基本结构(PKI)的概念
公钥证书 ,通常简称为证书 ,用于在 Internet.Extranet 和 Intranet 上进行身份验证并确保数据交换的安全.证书的颁发者和签署者就是众所周知的 证书颁发机构 (CA),将在下一 ...
- HDU 1836 畅通工程
畅通工程 Time Limit: 1000ms Memory Limit: 32768KB This problem will be judged on HDU. Original ID: 18636 ...
- [Cogs727] [网络流24题#2] 太空飞行计划 [网络流,最小割]
建图:源点—(w[i])—>实验—(∞)—>仪器—(cost[i])—>汇点, 如果该实验造成收益,则仪器到汇点的边在最小割中, 如果该实验造成损失,则源点到实验的边在最小割中, 故 ...