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 ...
随机推荐
- [转]Github 简明教程
如果你是一枚Coder,但是你不知道Github,那么我觉的你就不是一个菜鸟级别的Coder,因为你压根不是真正Coder,你只是一个Code搬运工. 但是你如果已经在读这篇文章了,我觉的你已经知道G ...
- MapReduce中,new Text()引发的写入HDFS的输出文件多一列的问题
前段时间业务系统有个模块数据没有了,在排查问题的时候发现中间处理环节出错了,错误日志为文件格式不正确,将数据导出后发现这个处理逻辑的输入文件中每一行都多了一列,而且是一个空列(列分隔符是\t).第一次 ...
- python 取整的两种方法
问题简介: 要把一个浮点数(float)整数部分提取出来.比如把“2.1”变成“2”的这一过程:现在我们给这个过程起一个名字叫“取整”.那么它 在python中大致可以有两种写法 写法1)类型转换: ...
- 在ubuntu16安装supervisor 并 启动 .net core.
1. 安装supervisor apt-get install supervisor 2.新建supervisor配置文件.使用以下命令在linux 命令行 echo_supervisord_conf ...
- docker容器网络通信原理分析
概述 自从docker容器出现以来,容器的网络通信就一直是大家关注的焦点,也是生产环境的迫切需求.而容器的网络通信又可以分为两大方面:单主机容器上的相互通信和跨主机的容器相互通信.而本文将分别针对这两 ...
- ios支付宝问题整合
1. 报错:rsa_private read error : private key is NULL 原因:私钥没有转成PKCS8 解决方法: 1)在RSADataSigne ...
- 关于如果从SQLSERVER中获取 数据库信息 或者 表信息
1.首先呢.要明确一点.SQLSERVER中的系统信息一般都无从table中找到的.通常都在View中找到 这是重点. 2.接着我们打开算起来SQLSERVER,展开你某一数据库.看到类似 3.然后展 ...
- 【Unity】3.0 第3章 创建和导入3D模型
分类:Unity.C#.VS2015 创建日期:2016-04-02 一.简介 利用Unity内置的基本模型和工具,不需要借助任何其他的三维建模软件,就可以直接创建出各种3D模型,这是这一章我们首先学 ...
- UIViewContrller之间切换的几种方式
转自:http://blog.csdn.net/likendsl/article/details/7542296 1.UIViewContrller之间的切换有三种方式: 一.UIView ...
- 加快android studio 编译速度(已更新至Android Studio 3.3.1)
1.加快AS启动速度 “Help”-"Edit Custom Properties...",在文件中输入 # custom Android Studio properties di ...