docker安装及加速配置
需要centos7版本,内核版本不低于3.10
[root@localhost ~]# uname -r
3.10.0-514.el7.x86_64
第一步:更新当前软件:
[root@localhost ~]#yum update
第二步:添加Docker的yum源
[root@localhost ~]# cat /etc/yum.repos.d/docker.repo
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg
第三步:安装Docker
[root@localhost ~]# yum install docker-engine
至此安装完成。
设置Docker服务开机自启
[root@localhost ~]# systemctl enable docker.service
启动Docker服务
[root@localhost ~]# systemctl start docker
验证Docker是否安装成功
[root@localhost ~]# docker run --rm hello-world
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/
由于国外的docker镜像仓库一般都比较慢,所以一般会使用国内的一些加速仓库,如阿里云
申请:https://cr.console.aliyun.com/#/accelerator
配置:
mkdir -p /etc/docker
cat /etc/docker/daemon.json
{
"registry-mirrors": ["https://xxxxxxx.mirror.aliyuncs.com"]
}
https://xxxxxxx.mirror.aliyuncs.com替换成你申请到的地址。
sudo systemctl daemon-reload
sudo systemctl restart docker
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
docker安装及加速配置的更多相关文章
- zabbix docker - 安装和初始化配置
zabbix docker - 安装和初始化配置 安装zabbix server docker-mysql版本 zabbix server支持不同的数据库(详见zabbix的docker hub),这 ...
- docker 安装redis 并配置外网可以访问
1, docker 拉去最新版本的redis docker pull redis #后面可以带上tag号, 默认拉取最新版本 2, docker安装redis container 安装之前去定义我们的 ...
- docker 安装redis 并配置外网可以访问 - flymoringbird的博客 - CSDN博客
原文:docker 安装redis 并配置外网可以访问 - flymoringbird的博客 - CSDN博客 端口映射,data目录映射,配置文件映射(在当前目录下进行启动). docker run ...
- Docker安装和常用配置【Linux】
Linux下安装配置docker 安装指南:https://developer.aliyun.com/article/110806 一.配置国内镜像源 1.1 设置国内阿里巴巴下载源 [root@lo ...
- 使用docker安装nginx并配置端口转发
使用docker安装并运行nginx命令: docker run --name=nginx -p 80:80 -d docker.io/nginx 使用命令: docker exec -it ngin ...
- docker安装与基本配置
Docker有很多种安装的选择,我们推荐您在Ubuntu下面安装,因为docker是在Ubuntu下面开发的,安装包测试比较充分,可以保证软件包的可用性.Mac, windows和其他的一些linux ...
- k8s集群之Docker安装镜像加速器配置与k8s容器网络
安装Docker 参考:https://www.cnblogs.com/rdchenxi/p/10381631.html 加速器配置 参考:https://www.cnblogs.com/rdchen ...
- docker安装 与 基本配置
1.安装docker #yum remove docker \ docker-common \ container-selinux \ docker-selinux \ docker-engine \ ...
- docker安装启动、配置MySql
1.安装mysql镜像 docker pull mysql/mysql-server 2.docker中启动Mysql容器 docker run --name mysql01 -d -p 3306:3 ...
随机推荐
- php分享十四:php接口编写
一:加密协议选择 二:常用url传递函数介绍 urlencode 和 rawurlencode 区别是: urlencode把空格变为+号,而rawurlencode编码为20%: base64_en ...
- Oracle多表关联如何更新多个字段
注意点:1.被update主表一定要加上过滤条件.2.查询出来更新结果集,同时也要作为被更新主表的条件,作为同步大家都是更新这部分数据.update student stu set (stu.name ...
- struts2:图解action之HelloWorld示范(从action转到JSP)
虽然Struts 2.x的Action在技术上不需要实现任何接口或继承任何类型,但是,大多情况下我们都会出于方便的原因,使Action类继承com.opensymphony.xwork2.Action ...
- 【凯子哥带你夯实应用层】使用ActionMode实现有删除动画的多选删除功能
转载请注明出处:http://blog.csdn.net/zhaokaiqiang1992 ActionMode是3.0之后.官方推荐的一种上下文菜单的实现方式,在之前一直用的是Co ...
- SQL Server 的动态语句(SQLServer 的String.format用法)(SQLServer的调用SQL占位符的使用)
直接上代码好了: --建表语句if exists(select 1 from [你的测试数据库名字].sys.tables where name='TDepartment') BEGIN print ...
- Shell中整数比較
-eq 等于,如:if ["$a" -eq "$b" ] -ne 不等于,如:if ["$a" ...
- 关于linux上cron服务的python封装工具
关于cron:定时任务服务,一般linux自带且已启动.(pgrep cron查看cron服务是否启动了.) 关于plan:一个通过python来定制cron服务的工具.其官网:http://plan ...
- DIOCP3-关于TIOCPConsole和编码解码器
TIOCPConsole是继承至TIocpTcpServer,做了管理和调用编码和解码器器的功能.可以通过向他注册编码和解码器可以忽略粘包的问题. 这样如果TIOCPConsole客户端必须按照一 ...
- xml属性定义
1. reference:参考某一资源ID. 1)属性定义: <declare-styleable name="名称"> <attr format="r ...
- UnicodeDecodeError: 'ascii' codec can't decode byte 0xa3 in position 1: ordinal not in range(128)
使用codecs模块 codecs模块能在处理字节流的时候提供很大帮助.你可以用定义的编码来打开文件并且你从文件里读取的内容会被自动转化为Unicode对象. 试试这个: >>> i ...