docker运行环境安装-centos(一)
在这里我们使用的是docker的社区版Docker CE,针对的是未安装docker的新的主机,如果安装过docker的早期版本,先卸载它们及关联的依赖资源,安装的版本为docker 18.03。
1、使用yum安装所需的软件包
[origalom@origalom ~]$ sudo yum install -y yum-utils device-mapper-persistent-data lvm2
2、设置 stable 镜像仓库
[origalom@origalom ~]$ sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
3、启用edge 和 testing 镜像仓库
[origalom@origalom ~]$ sudo yum-config-manager --enable docker-ce-edge
[origalom@origalom ~]$ sudo yum-config-manager --enable docker-ce-test
[origalom@origalom ~]$ sudo yum-config-manager --disable docker-ce-edge # 禁用
4、安装最新的CE
[origalom@origalom ~]$ sudo yum install docker-ce
5、安装指定版本的CE
在生产环境中,应安装特定版本的CE,而不是每次都使用最新版本。
[origalom@origalom ~]$ yum list docker-ce --showduplicates | sort -r # 查找可用版本
[origalom@origalom ~]$ sudo yum install docker-ce-<VERSION STRING> # 安装指定版本
6、启动docker
[origalom@origalom ~]$ sudo systemctl start docker
7、验证是否安装成功
[origalom@origalom ~]$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ca4f61b1923c: Pull complete
Digest: sha256:97ce6fa4b6cdc0790cda65fe7290b74cfebd9fa0c9b8c38e979330d547d22ce1
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://cloud.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/
此命令将下载一个测试镜像并在容器中运行它。容器运行时,它将输出一条参考消息并退出。
参考文档:
docker运行环境安装-centos(一)的更多相关文章
- docker运行环境安装-后续步骤(二)
1.以非 root 用户身份管理 Docker [origalom@origalom ~]$ sudo groupadd docker # 创建docker用户组[origalom@origalom ...
- Linux Centos7部署环境安装-CentOS
Linux Centos7部署环境安装-CentOS Centos7部署环境安装及Linux常用命令 centos系统下各文件夹的作用 centos7修改系统默认语言 centos7安装rz/sz命令 ...
- Tsung运行环境安装(转)
转自:http://www.cnblogs.com/tsbc/p/4272974.html#_Toc372013359 tsung Tsung运行环境安装 检查安装一下依赖包,以免在安装的时候报错.( ...
- 2步安装1个hive docker运行环境[centos7]
1 构建基础容器 基于centos环境docker环境快速搭建,执行步骤 docker build -t cenosbase7 . 执行此步骤就可以构建1个基础的centos基础运行环境 相关的文件如 ...
- win10安装docker运行环境
转自:https://www.cnblogs.com/stulzq/p/7743667.html Docker for Windows是Docker社区版(CE)应用程序. Docker for Wi ...
- Docker学习笔记之搭建Docker运行环境
0x00 概述 既然 Docker 是一款实用软件,我们就不得不先从它的安装说起,只有让 Docker 运行在我们的计算机上,才能更方便我们对 Docker 相关知识和使用方式的学习.得益于与商业性的 ...
- 2.云原生之Docker容器环境安装实践
转载自:https://www.bilibili.com/read/cv15181036/?from=readlist 官方一键安装脚本 补充时间:[2020年4月22日 11:00:59] 一键安装 ...
- ECOS运行环境安装(一)
ECOS为上海商派公司研发的PHP电商框架.详情见 http://www.ec-os.net/doc.html 本文介绍CentOS6.x 64位下安装ECOS1.2运行环境的具体步骤: 1)需要准备 ...
- Docker03-安装Docker运行环境
目录 Ubuntu 18 中安装Docker 查看Docker安装信息 查看Docker版本,命令:docker version 查看Docker运行信息,命令: docker info 检查安装是否 ...
随机推荐
- Activity(活动)生命周期--系统回收活动数据存储
当一个活动进入停止状态的时候,是有可能被系统回收的.那如果处于停止状态的活动被系统回收了,而它上面却有我们所需要数据该如何保存呢?(类似于:打开qq进入下一个界面没有进去,返回的时候仍然不需要你输入账 ...
- cocos2d-x解析xml时的Bug
cocos2d-x中使用tinyxml解析xml配置.如下: tinyxml2::XMLDocument doc; if (tinyxml2::XML_SUCCESS != doc.LoadFile( ...
- Generator函数(三)
Generator.prototype.return() 1.Generator函数返回的遍历器对象还有一个return方法,可以返回给定的值,并终结Generator函数的遍历. function* ...
- iOS \U6b3e转字符串
-(NSString *)replaceUnicode:(NSString *)unicodeStr { NSString *tempStr1 = [unicodeStr stringByReplac ...
- bcp功能
#include "MyBCP.h" #include "odbcss.h" //1,Allocate an environment handle and a ...
- 通过pl/sql计算程序的运行时间
在sqlplus中运行sql语句或者pl/sql的时候如果需要统计运行的时间,只需要开启set timing on选项即可. SQL> set timing onSQL>SQL> s ...
- IIS整合tomcat
IIS6.0+Tomcat7.0整合总结 (一) 为什么要把IIS.Tomcat整合到一起? 假如你遇到这种情况,你开发了一个javaweb项目要部署到服务器上,但是这个服务器上已经部署了asp. ...
- [Linux] Proc 文件系统
转载自:http://linux.chinaunix.net/doc/2004-10-05/16.shtml#324lfindex0 目录: /proc --- 一个虚拟文件系统 加载 proc 文件 ...
- Struts2 中#、@、%和$符号的用途
一.#符号的用途一般有三种. “#”主要有三种用途: 1. 访问OGNL上下文和Action上下文,#相当于ActionContext.getContext():下表有几个ActionContext中 ...
- NormalMap 贴图 【转】
转载: http://www.zwqxin.com/archives/shaderglsl/review-normal-map-bump-map.html 说起Normal Map(法线贴图),就 ...