Docker 要求 Ubuntu 系统的内核版本高于 3.10 ,查看本页面的前提条件来验证你的 Ubuntu 版本是否支持 Docker。

通过 uname -r 命令查看你当前的内核版本

 uname -r

4.15.0-20-generic

版本是4.15所以就没问题

然后使用脚本安装Docker

1.获取最新版本的Docker安装包

wget -qO- https://get.docker.com/ | sh

安装完会有个提示:

If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like: sudo usermod -aG docker limingxing(我的用户名) Remember that you will have to log out and back in for this to take effect!

当要以非root用户可以直接运行docker时,需要执行 sudo usermod -aG docker runoob 命令(每次都是)

2.启动docker后台服务

 sudo service docker start

3.测试运行hello world

 sudo docker run hello-world

运行结果为(可以好好读一下setps):

Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
9bb5a5d4561a: Pull complete
Digest: sha256:3e1764d0f546ceac4565547df2ac4907fe46f007ea229fd7ef2718514bcec35d
Status: Downloaded newer image for hello-world:latest Hello from Docker!
This message shows that your installation appears to be working correctly. To generate this message, Docker took the following steps:
. The Docker client contacted the Docker daemon.
. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal. To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

鉴于国内网络问题,后续拉取 Docker 镜像十分缓慢,我们可以需要配置加速器来解决,我使用的是网易的镜像地址:http://hub-mirror.c.163.com。

新版的 Docker 使用 /etc/docker/daemon.json(Linux)来配置 Daemon。

请在该配置文件中加入(没有该文件的话,请先建一个):

{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}
 

4.15.0-20-generic

ubantu下装Docker的更多相关文章

  1. Ubantu下 docker的安装

    另一种方法 1.切换到root权限或者用sudo 2.升级source列表并保证https和ca证书成功安装 # apt-get update # apt-get install apt-transp ...

  2. ubantu下docker安装

    开始安装 由于apt官方库里的docker版本可能比较旧,所以先卸载可能存在的旧版本: sudo apt-get remove docker docker-engine docker-ce docke ...

  3. CentOS6.5 64位下装Docker

    试装,仅仅是做个记录. [root@localhost ~]# sudo tee /etc/yum.repos.d/docker.repo <<-'EOF' > ; > [do ...

  4. 在redhat6上装1.8以下的docker

    因为目前1.8以上的docker最低要求是3.10的Linux内核,而我的内核版本远低于此. [root@localhost home]# uname -r -.el6.x86_64 鉴于我的vm上有 ...

  5. docker:docker的基本了解

    1.什么是docker 简单的理解:docker相当于vmvare,容器相当于多个虚拟机,vmvare上可以运行ubantu16.04的虚拟机,也可以运行centos虚拟机,还可以运行redhat虚拟 ...

  6. OpenFace的一些了解

    1.OpenFace内4个样例代码 配置学习了两个 其一: Ubantu 基本命令 Docker 安装方式.发布网站方式.查看验证安装结果命令 Openface 基本demo 实现方式.和基本原理 其 ...

  7. docker中pull镜像,报错 pull access denied for ubantu, repository does not exist or may require 'docker login'

    报错说明:拒绝获取ubantu,  仓库不存在或者需要登录docker 1.先尝试注册docker 2.在拉镜像前,先登录docker, 命令:docker  login 3.然后执行 docker ...

  8. ubantu中执行docker免sudo方法

    1.添加用户组,如果已存在则不用设置. sudo groupadd docker 2.将用户加入该 group (docker)内 sudo gpasswd -a ${USER} docker 3.重 ...

  9. Docker的基础知识与安装(Ubantu CentOS)

    Docker是一种允许特殊类型虚拟化的实用程序.Docker允许使用Docker镜像在系统上“虚拟”运行程序.可以下载或创建可以运行的图像.一旦加载并执行了图像,它现在就是一个容器.容器已为容器内的程 ...

随机推荐

  1. 聊聊ES7与ES8特性

    译者按: 转眼ES6发布2年了,是时候了解一下ES7与ES8特性了! 原文: ES7 and ES8 Features 译者: Fundebug 为了保证可读性,本文采用意译而非直译,并且对源代码进行 ...

  2. 课程作业——熟悉常用的Linux操作

    cd命令:切换目录 (1) 切换到目录 /usr/local cd /usr/local (2) 去到目前的上层目录 cd .. (3) 回到自己的主文件夹 cd ~ ls命令:查看文件与目录 (4) ...

  3. linux 下 ifcfg-ethx配置和解析

    网络接口配置文件[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0# Intel Corporation 82545EM ...

  4. thinkphp 3.2 去除调试模式后报错,怎么解决

    1.案例一: 最近用ThinkPHP开发一个项目,本地开发测试完成上传到服务器后,第一次打开正常,再刷新页面时就出现 “页面调试错误,无法找开页面,请重试”的错误. 我就郁闷啦,明明本地设置defin ...

  5. git 常用操作,下拉,提交,更新,还原

    注: origin为远程仓库名称 master为远程分支名称   //第一次提交所有代码 1.git clone 项目url 2.复制.git 和文件到根目录 3.git add . 4.git co ...

  6. JavaScript中的let和const

    在ES6之前,JavaScript中只有两种作用域:全局作用域和函数内部的局部作用域.ES6中新增了两个重要的关键字,let和const,从而引入了块级作用域. 关键字var 使用var关键字声明的变 ...

  7. seajs的原理以及基本使用

    seajs模块化开发 模块化开发,把整个文件分割成一个一个小文件. 使用方法 使用方法特别简单,首先在官网中下载sea.js,然后在页面中引入. index.html // 1.路径 // 2.回调 ...

  8. VMware安装Centos7后有线线缆被拔出

    背景:在win10 系统中的虚机软件VMware Workstation中安装CentOS7桌面版,安装过程中没有设置网络 1.确认你win10系统打开了这两个服务:VMware DHCP Servi ...

  9. Big Endian  和 Little Endian 模式的区别

    谈到字节序的问题,必然牵涉到两大CPU派系.那就是Motorola的PowerPC系列CPU和Intel的x86系列CPU.PowerPC系列采用big endian方式存储数据,而x86系列则采用l ...

  10. [20181130]如何猜测那些值存在hash冲突.txt

    [20181130]如何猜测那些值存在hash冲突.txt --//今年6月份开始kerrycode的1个帖子提到子查询结果缓存在哈希表中情况:--//链接:http://www.cnblogs.co ...