centos 7使用yum安装docker容器
使用yum命令即可安装
yum install docker
安装完成后,使用下面的命令来启动 docker 服务,并将其设置为开机启动:
[root@localhost ~]# systemctl start docker.service
[root@localhost ~]# systemctl enable docker.service
下载官方的 CentOS 镜像到本地 (由于 Docker 被墙 ,所以使用 http://docker.cn 的镜像)
[root@localhost ~]# docker pull centos
Pulling repository centos
192178b11d36:Download complete
70441cac1ed5:Download complete
ae0c2d0bdc10:Download complete
511136ea3c5a:Download complete
5b12ef8fd570:Download complete
确认 CentOS 镜像已经被获取:
[root@localhost ~]# docker images centos
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
centos centos5 192178b11d362 weeks ago 466.9 MB
centos centos6 70441cac1ed52 weeks ago 215.8 MB
centos centos7 ae0c2d0bdc10 2 weeks ago 224 MB
centos latest ae0c2d0bdc10 2 weeks ago 224 MB
运行一个 Docker 容器:
[root@localhost ~]# docker run –i –t centos /bin/bash
[root@dbf66395436d /]#
我们可以看到,CentOS 容器已经被启动,并且我们得到了 bash 提示符。在 docker 命令中我们使用了 “-i 捕获标准输入输出”和 “-t 分配一个终端或控制台”选项。若要断开与容器的连接,输入 exit。
[root@cd05639b3f5c /]# cat /etc/RedHat–release
CentOSLinux release 7.0.1406(Core)
[root@cd05639b3f5c /]#exit
exit
[root@localhost ~]#
我们还可以搜索基于 Fedora 和 Ubuntu 操作系统的容器。
[root@localhost ~]# docker search ubuntu
[root@localhost ~]# docker search fedora
显示当前正在运行容器的列表
docker ps
centos 7使用yum安装docker容器的更多相关文章
- CentOS 7使用yum安装Docker
安装依赖 # 配置阿里云源 # 备份 cp /etc/yum.repos.d/CentOS-Base.repo{,.bak'_'`date +%Y%m%d_%H%M%S`} # 下载 wget -O ...
- CentOS7 下 yum 安装 Docker CE
前言 Docker 使用越来越多,安装也很简单,本次记录一下基本的步骤. Docker 目前支持 CentOS 7 及以后的版本,内核要求至少为 3.10. Docker 官网有安装步骤,本文只是记录 ...
- centos安装docker容器
centos安装docker容器 系统环境需求 docker要运行在centos7系统中,系统为64位机器上,内核最小版本在3.10以上 如果系统为centos6,后面有附带的安装方法 uname - ...
- 配置docker官方源并用yum安装docker
一.docker的官方安装文档: https://docs.docker.com/engine/installation/linux/centos/ 由docker给的文档可以看出它也只是去配置了一个 ...
- 在centos和redhat上安装docker
前置条件 64-bit 系统 kernel 3.10+一.检查内核版本,返回的值大于3.10即可 $ uname -r 二.使用 sudo 或 root 权限的用户登入终端 三.卸载旧版本(如果安装过 ...
- CentOS 7.3 上安装docker
Docker,分为社区版CE和企业版EE.社区版是免费提供给个人开发者和小型团体使用的,企业版会提供额外的收费服务. 一.安装docker 1.Docker 要求 CentOS 系统的内核版本高于 3 ...
- CentOS下通过yum安装svn及配置
CentOS下通过yum安装svn及配置 1.环境centos5.5 2.安装svnyum -y install subversion 3.配置 建立版本库目录mkdir /www/svndata s ...
- Linux CentOS 6.5 yum安装MongoDB的操作
安装MongoDB的方法有很多种,可以源代码安装,在CentOS也可以用yum源安装的方法.由于MongoDB更新得比较快,我比较喜欢用yum源安装的方法.64位CentOS下的安装步骤如下: 1.准 ...
- CentOS 7 使用yum安装出现错误
CentOS 7 使用yum安装软件出现错误: Loaded plugins: fastestmirror 此错误信息可能是因为DNS配置错误,可以通过更改配置文件来解决: 1. 使用vi打开DNS的 ...
随机推荐
- UVA - 11825 状压DP
该题目是EMAXX推荐的练习题,刘汝佳的书也有解说 如果S0属于全集,那S0就可以作为一个分组,那么S分组数可以是best{当前S中S0的补集+1} 对于集合类的题目我觉得有点抽象,希望多做多理解把 ...
- [转] 完全卸载删除gitlab
[From] https://yq.aliyun.com/articles/114619 完全卸载删除gitlab 1.停止gitlab gitlab-ctl stop 2.卸载gitlab(注意这里 ...
- Oracle sql语句中不支持boolean类型(decode&case)
[转自] http://blog.csdn.net/t0nsha/article/details/7828538 Oracle sql语句中不支持boolean类型(decode&case) ...
- 地牢逃脱----DFS搜索最优解
https://www.nowcoder.com/practice/0385945b7d834a99bc0010e67f892e38?tpId=85&tqId=29831&tPage= ...
- C++ GUI Qt4编程(13)-6.2preferencedialog
1. 主要介绍了QStackedLayout.QListWidget.QDialogButtonBox的简单用法.2. QStackedLayout: 要使某个特定的子窗口部件可见,可以用setC ...
- redis API ---python
一, 安装配置 必须安装python3以上 配置文件自己下载,搜索名字百度 解压---->Python --->./configure-->yum install -y zlib* ...
- 移动开发:Android官方提供的支持不同屏幕大小的全部方法
转载请注明出处:http://blog.csdn.net/sinyu890807/article/details/8830286 原文地址为:http://developer.android.com/ ...
- JS代码格式化排版工具,web文本编辑器
js格式化代码工具:http://www.cnblogs.com/blodfox777/archive/2008/10/09/1307462.html web文本编辑器 :http://www.div ...
- tomcat修改域名和访问域名时去掉项目名
打开tomcat安装目录,根据路径找到 server.xml 路径D:\apache-tomcat-7.0.70\conf\server.xml 打开后 找到这一段 <Connector ...
- PHP邮件发送
php带有内置的mail() 发送邮件函数,但是较为繁琐:建议上网下载一个PHPMailer: