linux下安装与运行docker
写者环境:
1.lsb_release -a
hello@hello:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS
Release: 16.04
Codename: xenial
2.更新apt和安装gpg秘钥
2.1 sudo apt-get update
2.2 sudo apt-get install apt-transport-https ca-certificates
2.3 sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
3.编辑源文件
sudo vi /etc/apt/source.list.d/docker.list (此文件不存在就直接创建即可)
将文件中的所有内容都删掉,然后写入内容入下:
deb https://apt.dockerproject.org/repo ubuntu-xenial main
4.更新apt包索引
sudo apt-get update
5.安装docker
sudo apt-get install docker-engine
6.启动docker
sudo service docker start
7.验证docker是否正在运行
sudo docker run hello-world
写者运行结果如下:
hello@hello:~$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
b04784fba78d: Pull complete
Digest: sha256:f3b3b28a45160805bb16542c9531888519430e9e6d6ffc09d72261b0d26ff74f
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:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. 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://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
8.将当前用户加入到docker组
sudo usermod -a -G docker hello
9.重启docker
sudo service docker restart
linux下安装与运行docker的更多相关文章
- Linux下安装Wine运行windows程序
资料 首页 https://www.winehq.org/ 安装 https://www.winehq.org/download/ 教程 https://www.winehq.org/document ...
- Linux下安装Wine 运行、卸载 windows程序
资料 首页 https://www.winehq.org/ 安装 https://www.winehq.org/download/ 教程 https://www.winehq.org/document ...
- linux下安装jre运行环境
上官网下载安装文件:点击打开链接 文件名:jre-8u65-linux-x64.gz安装步骤1.解压tar -xzvf jre-8u65-linux-x64.gz2.将解压后的文件放到/usr/lib ...
- 在linux下安装并运行scrapyd
系统:centos7.4 安装scrapyd:pip isntall scrapyd 因为我腾讯云上是python2与python3并存的 所以我执行的命令是:pip3 isntall scrapyd ...
- linux 下安装 jre
本文链接:https://blog.csdn.net/qq_34368587/article/details/79559102 Linux下安装Java运行环境 现需要项目部署到Linux中,需要配置 ...
- Docker学习笔记二(linux下安装Docker)
Docker学习笔记二(linux下安装Docker) 1.在线安装linux Docker 这种方式首先要保证linux 环境下可以上网,当然,小编是在自己的电脑上安装了虚拟机,在虚拟机上安装了,l ...
- Linux下安装Tomcat服务器和部署Web应用
一.上传Tomcat服务器
- Linux下安装使用Solr
Linux下安装使用Solr 1.首先下载Solr.mmseg4j分词包.tomcat并解压,这用google.百度都可以搜索得到下载地址. 2.因为要使用到中文分词,所以要设置编码,进入tomcat ...
- Linux下安装tar.gz类型的jdk,并配置环境变量
近期因要学习一门技术,必须在Linux下运行,故开始学习如何使用Linux. 在安装jdk时出现了困难,环境变量配置不成功,花了一天时间才搞定,特分享出来,供大家参考. Linux下安装jdk,步骤如 ...
随机推荐
- HTML文件默认内容
<!DOCTYPE html> <!-- 声明使用html5标准 --> <html lang="en"> <!-- html标签开始(只 ...
- find a way to escape--hdu1593
题目链接 : http://acm.hdu.edu.cn/showproblem.php?pid=1593 找到二者角速度相等时水中人的R,在此之前二者保持在一条直线上,之后水中的人沿直线到岸边S点匀 ...
- 洛谷P2312 解方程 [noip2014] 数论
正解:数论 解题报告: 这儿是,传送门qwq 又是很妙的一道题呢,专门用来对付我这种思维僵化了的傻逼的QAQ 首先看题目的数据范围,发现a<=1010000,很大的一个数据范围了呢,那这题肯定不 ...
- [python-opencv] 模糊操作
@不要在奋斗的年纪 选择安逸 均值模糊 中值模糊 自定义模糊 意义与应用场景 模糊的基本原理: 1.基于离散卷积 2.定义好每个卷积核 3.不同卷积核得到不同的卷积效果 4.模糊是卷积的一种表象 #均 ...
- linux删除指定行&删除行首空格&替换字符
打印并删除2~1000行 nl /etc/passwd | sed '2,1000d' |more 删除行首空格 sed -i 's/^[][ ]*//g' file 替换分隔符 说明:文件中数据是由 ...
- mysql 操作sql语句 操作数据表
#2. 操作文件 先切换到文件夹下:use db1 查看当前所在的数据库 mysql> select database(); +------------+ | database() | +--- ...
- 修改dedecms面包屑导航的首页链接关键字
dedecms面包屑导航默认是"主页>分类>二级分类>",我们知道链接的锚文字对排名有一定影响,这时可以考虑将“主页”改成具体的关键字,那么如何修改dedecms ...
- 【2014腾讯实习招聘-面试-移动client开发】
版权声明:本文为博主原创文章,欢迎转载,转载请注明出处. https://blog.csdn.net/kana007/article/details/24375423 个人学习整理.如 ...
- InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法
InnoDB: Operating system error number 87 in a file operation. 错误87的解决方法 140628 8:10:48 [Note] Plugi ...
- 应用笔画宽度变换(SWT)来检测自然场景中的文本
Introduction: 应用背景:是盲人辅助系统,城市环境中的机器导航等计算机视觉系统应用的重要一步.获取文本能够为许多视觉任务提供上下文的线索,并且,图像检索算法的性能很大部分都依赖于对应的文本 ...