博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
阿里云ECS使用
阅读量:2095 次
发布时间:2019-04-29

本文共 1314 字,大约阅读时间需要 4 分钟。

按流量计费设置使用ALI镜像源:

mirrors.aliyuncs.com

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
wget -O //yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache

使用 EPEL 库安装 Docker

rpm -e lvm2-7:2.02.105-14.el7.x86_64

curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/intranet | sh -
配置Docker加速器

您可以使用如下的脚本将mirror的配置添加到docker daemon的启动参数中。

# 系统要求 CentOS 7 以上,Docker 1.9 以上。sudo cp -n /lib/systemd/system/docker.service /etc/systemd/system/docker.servicesudo sed -i "s|ExecStart=/usr/bin/docker daemon|ExecStart=/usr/bin/docker daemon --registry-mirror=https://s99qctbi.mirror.aliyuncs.com|g" /etc/systemd/system/docker.servicesudo systemctl daemon-reloadsudo service docker restart

service docker start 

#docker pull mysql:5.7 从Docker Hub 仓库中下载镜像  

//阿里DOCKER仓库 http://dev.aliyun.com/search.html?spm=5176.775974865.0.0.wCqg8O

docker pull registry.mirrors.aliyuncs.com/library/mysql 

  1. # /etc/sysconfig/docker  
  2. #  
  3. # Other arguments to pass to the docker daemon process  
  4. # These will be parsed by the sysv initscript and appended  
  5. # to the arguments list passed to docker -d  
  6.   
  7. other_args="--insecure-registry=registry.mirrors.aliyuncs.com"  

docker images  

docker run -i -t registry.mirrors.aliyuncs.com/library/centos /bin/bash

service docker restart 

转载地址:http://uiuhf.baihongyu.com/

你可能感兴趣的文章
Intellij IDEA使用(三)——在Intellij IDEA中配置Tomcat服务器
查看>>
Intellij IDEA使用(四)—— 使用Intellij IDEA创建静态的web(HTML)项目
查看>>
Intellij IDEA使用(五)—— Intellij IDEA在使用中的一些其他常用功能或常用配置收集
查看>>
Intellij IDEA使用(六)—— 使用Intellij IDEA创建Java项目并配置jar包
查看>>
Eclipse使用(十)—— 使用Eclipse创建简单的Maven Java项目
查看>>
Eclipse使用(十一)—— 使用Eclipse创建简单的Maven JavaWeb项目
查看>>
Intellij IDEA使用(十三)—— 在Intellij IDEA中配置Maven
查看>>
面试题 —— 关于main方法的十个面试题
查看>>
集成测试(一)—— 使用PHP页面请求Spring项目的Java接口数据
查看>>
FastDFS集群架构配置搭建(转载)
查看>>
目的:使用CUDA环境变量CUDA_VISIBLE_DEVICES来限定CUDA程序所能使用的GPU设备
查看>>
TP5.1模板布局中遇到的坑,配置完不生效解决办法
查看>>
TP5.1事务操作和TP5事务回滚操作多表
查看>>
TP5.1项目从windows的Apache服务迁移到linux的Nginx服务需要注意几点。
查看>>
win10安装软件 打开时报错 找不到 msvcp120.dll
查看>>
PHPunit+Xdebug代码覆盖率以及遇到的问题汇总
查看>>
PHPUnit安装及使用
查看>>
PHP项目用xhprof性能分析(安装及应用实例)
查看>>
composer安装YII
查看>>
Sublime text3快捷键演示
查看>>