经过昨天和今天的不断奋战,在阿里云里面搭建Docker并不easy。

所以我认为有必要记录下来,以供后人学习。

以及我自己的回想。

首先,查看我们的系统版本号

cat /etc/issue

的到的输出是

Ubuntu 12.04.1 LTS \n \l

我们顺便看一下内核版本号,由于Docker须要在3.8以上执行。

uname -r

能够得到你的内核版本号,我由于要装docker,所以依照docker官网的步骤升级了内核,所以输出是:

3.8.0-44-generic

docker 的Ubuntu安装说明在:https://docs.docker.com/installation/ubuntulinux/



怎样升级内核?

升级内核的步骤事实上非常easy,依据Docker官网提供的就好:

指令例如以下:

# install the backported kernel
$ sudo apt-get update
$ sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring # install the backported kernel and xorg if using Unity/Xorg
$ sudo apt-get install --install-recommends linux-generic-lts-raring xserver-xorg-lts-raring libgl1-mesa-glx-lts-raring # reboot
$ sudo reboot

须要重新启动。

更新安装源

我在运行apt-get install docker.io的时候,总是提示找不到,所以说明我的安装源出了问题,所以,有必要说明怎样搞定安装源。让我们的过程无错进行。

首先,备份源列表

cp /etc/apt/sources.list /etc/apt/sources.list_backup

然后。用vim 打开 源列表文件。

vim /etc/apt/sources.list

清空里面的已有列表,然后,我们选择阿里云列表。由于我们是阿里云server嘛。

阿里云源列表例如以下:

deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

然后运行更新命令

apt-get update

这个时候会出现公钥问题

提示的错误类似例如以下:

W: There is no public key available for the following key IDs:
8B48AD6246925553

于是,我们又得解决问题。

运行例如以下命令:

apt-get install debian-keyring debian-archive-keyring && sudo apt-key update
apt-key adv --recv-key --keyserver keyserver.ubuntu.com 8B48AD6246925553

上述命令,的那个数字要换成你的,亲。

然后,再次运行apt-get update。

发现能够了。没有问题。

于是,我们又回到“正事”,安装docker

apt-get install docker.io

这次顺利的完毕了安装。

开启服务

root@iZ28ikebrg6Z:/etc/apt# service docker.io restart
stop: Unknown instance:
docker.io start/running, process 11430

只是接下来还会碰到问题。

 docker run -i -t ubuntu /bin/bash
2014/10/15 11:31:30 Cannot connect to the Docker daemon. Is 'docker -d' running on this host?

这个问题。下节继续。

阿里云Ubuntu环境搭建Docker服务的更多相关文章

  1. 阿里云ubuntu环境笔记

    安装jdk8 1.下载JDK 从官网下载jdk8 jdk-8u5-linux-x64.tar.gz 2.解压 $ tar -zxvf jdk-8u5-linux-x64.tar.gz 解压出来是一个j ...

  2. 【转】阿里云Ubuntu系统搭建SVN服务器

    ##SVN服务器相关软件安装 1.使用SSH远程服务器 (1)对于MAC OS/Liunx的用户直接打开终端输入 ssh  用户名@实例名,例如 ssh root@192.168.1.100 执行上面 ...

  3. 阿里云学生服务器搭建网站-Ubuntu16.04安装php开发环境

    阿里云学生服务器搭建网站(2)-Ubuntu16.04安装php开发环境  优秀博文:https://www.linuxidc.com/Linux/2016-10/136327.htm https:/ ...

  4. 在阿里云Ubuntu 14.04 Linux服务器上安装docker

    参考 How To Install and Use Docker: Getting Started 这篇最靠谱的文档在阿里云 Ubuntu  14.04 服务器上成功安装 docker . ---- ...

  5. 阿里云Linux CentOS 7 Docker部署使用gogs搭建自己的git服务器

    一.前言 Git是目前优秀和流行的源代码管理工具.而GitHub是一个面向开源及私有软件项目的托管云平台,但开源免费,私有收费.而公司出于商业化等目的需要搭建自己的源代码托管服务器.通过网上了解Gog ...

  6. 阿里云ubuntu 16.04 搭建pptpd 第二版

    前言:1.我常用的服务器在国内,但我又有某方面的需求,所以想要搭建一个pptpd的服务器    2.但我又不常用,所以感觉阿里云包年包月的不划算,所以准备采用阿里云按量付费的实例来搭建pptpd,并形 ...

  7. 【站长起步】阿里云+Ubuntu+java 7+ Tomcat 7 +Nginx1.6 +Mysql 5.6

    本文记载了在阿里云ubuntu+java 镜像环境下搭建站点server环境中遇到的的错误和解决方式. 作为一个年轻人,是肯定不会去用alidata这个现成的环境的.怎么办? 所有删除.立刻创建一个 ...

  8. 阿里云Ubuntu快速建站

    阿里云Ubuntu快速建站 有一个小笑话: 从前有个程序员遇到了一个问题.他想,没事,我懂,用线程就好了.现他有两个问题了. 本人小白,对网站部署什么都不懂,只是申请个阿里云服务器,把我的站点放上去. ...

  9. 【CUDA 基础】0.0 腾讯云CUDA环境搭建

    title: [CUDA 基础]0.0 腾讯云CUDA环境搭建 categories: CUDA Freshman tags: CUDA 环境搭建 toc: true date: 2018-02-13 ...

随机推荐

  1. PHP中使用XMLRPC

    PHP中简单使用XMLRPC,服务器端和客户端都为PHP代码实现. 这里使用的XML-RPC完整包括client和server的XML-RPC实现. 客户端和服务器端分别由 xmlrpc_client ...

  2. 【Todo】Apache-Commons-Pool及对象池学习

    有这篇文章: http://www.cnblogs.com/tommyli/p/3510095.html 方案提供了三种类型的pool,分别是GenericKeyedObjectPool,SoftRe ...

  3. 固定标题列、标题头table

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  4. Python \xd7\xaa\xd5\xbdOTT TV\xb1\xa6\xbd\xe0 编码

    import chardet s = '\xd7\xaa\xd5\xbdOTT TV\xb1\xa6\xbd\xe0\xc7\xa3\xca\xd6\xd2\xf8\xba\xd3\xa1\xa4\x ...

  5. 如何在不重启或重新格式化hadoop集群的情况下删除集群节点

    在master节点上的hadoop安装目录下 进入conf目录 配置hdfs-site.xml文件 添加节点如下: <property> <name>dfs.hosts.exc ...

  6. 表单提交时上传图片 表单ajax提交

    页面 <script type="text/javascript" src="js/jquery.form.js"></script>& ...

  7. DirectShow控制台输出和保存视频设备名称

    #include "windows.h" #include "TCHAR.h" #include <dshow.h> #include <ve ...

  8. 火车票订票API 用PHP完成火车票订票流程

    本教程用来演示聚合数据-火车票订票接口的使用流程. 配置好PHP环境,PHP版本最好大于5.5 去聚合数据-火车票订票接口申请key:http://www.juhe.cn/docs/api/id/17 ...

  9. python——PEP8 Python 编码规范整理

    决定开始Python之路了,利用业余时间,争取更深入学习Python.编程语言不是艺术,而是工作或者说是工具,所以整理并遵循一套编码规范是十分必要的.所以今天下午我根据PEP 8整理了一份,以后都照此 ...

  10. Linux——下常用程序的代理服务器(proxy)配置

    Linux下有很多程序都只有命令行接口,对于这类程序,它们通过代理服务器(proxy)访问网络的方式也不尽相同.在本文中Easwy总结了一些常用Linux程序配置代理服务器的方法. [ 通用代理服务器 ...