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,步骤如 ...
随机推荐
- arcgis server multipoint 服务 applyedit功能
首先打开arcmap,在catalog中新建 File GDB 在File GDB 中新建 Feature Class 类型选择 Multipoint 选择坐标 此时图层列表中有了新建的要素,点击Ed ...
- Cable master---poj1064(二分|卡精度)
题目链接:http://poj.org/problem?id=1064 题意:有n条绳子,长度为Li,现在从这n条绳子中切割出K条相等的绳子,问切割出来的这k条绳子的最大长度为多少: 二分判断即可: ...
- Socket通信的Python实现
Python中实现socket通信,socket通信的服务端比较复杂,而客户端非常简单,所以客户端基本上都是用sockct模块实现,而服务 端用有很多模块可以使用.下面就说一下服务端可使用的模块. 模 ...
- 启动spark-shell
$cd /app/hadoop/spark-1.1.0/bin $spark-shell --master spark://SPARK02:7077 --executor-memory 500m 特别 ...
- IO流(4)重命名
重命名功能:public boolean renameTo(File dest) * 如果路径名相同,就是改名. * 如果路径名不同,就是改名并剪切. * * 路径以盘符开始:绝对路径 c:\\a.t ...
- mysql集群搭建,主主复制
1:mysql搭建远程连接 https://www.cnblogs.com/davidgu/p/3706663.html 2: 两台主机能够相互通信 ,使用ping C:\Users\lenovo&g ...
- (转)How to Use Elasticsearch, Logstash, and Kibana to Manage MySQL Logs
A comprehensive log management and analysis strategy is vital, enabling organizations to understand ...
- POJ3169:Layout(差分约束)
http://poj.org/problem?id=3169 题意: 一堆牛在一条直线上按编号站队,在同一位置可以有多头牛并列站在一起,但编号小的牛所占的位置不能超过编号大的牛所占的位置,这里用d[i ...
- word转pdf时图片质量下降的解决方案__亲测有效
写论文时经常需要将word文档转成pdf文档,通常的做法是word另存为pdf文档,这样很简洁很方面,可是最大的问题是图片质量会大大下降.究其原因,“另存为”选项会压缩图片,以降低pdf文档的大小.解 ...
- DirectShow SDK下载
http://blog.csdn.net/zx3517288/article/details/50547243 Q : GRMSDK_EN_DVD.iso 5 67.3MBGRMSDKIAI_EN_D ...