zoukankan      html  css  js  c++  java
  • docker加速配置阿里云镜像

    Docker加速器
    使用Docker官方获取镜像,由于网络原因,拉取镜像的过程非常慢,通过配置docker加速器提升了国内网络访问Docker Hub的速度;

    docker环境已安装

    从DaoCloud获取,同样可以选择阿里云等获取;
    [root@GaoServer docker]# curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://cd841f18.m.daocloud.io
    docker version >= 1.12
    {"registry-mirrors": ["http://cd841f18.m.daocloud.io"],}
    Success.
    You need to restart docker to take effect: sudo systemctl restart docker
    [root@GaoServer docker]# systemctl daemon-reload
    [root@GaoServer docker]# systemctl restart docker
    Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
    [root@GaoServer docker]# cat daemon.json
    {"registry-mirrors": ["http://cd841f18.m.daocloud.io"],}
    [root@GaoServer ~]# docker --version
    Docker version 1.13.1, build 774336d/1.13.1

    创建或修改 /etc/docker/daemon.json 文件,修改为如下形式 (请将 加速地址 替换为在加速器页面获取的专属地址)
    [root@GaoServer docker]# vim daemon.json
    {
    "registry-mirrors": [
    "http://cd841f18.m.daocloud.io"
    ],
    "insecure-registries": []
    [root@GaoServer docker]# systemctl daemon-reload
    [root@GaoServer docker]# systemctl restart docker
    [root@GaoServer docker]# docker pull docker.io/centos
    Using default tag: latest
    Trying to pull repository docker.io/library/centos ...
    latest: Pulling from docker.io/library/centos
    469cfcc7a4b3: Pull complete
    Digest: sha256:4b63b3e9fe127c07a15458af7fcc187980a9fff8069063057bbc9c282f26f539
    Status: Downloaded newer image for docker.io/centos:latest
    [root@GaoServer docker]# docker images
    REPOSITORY TAG IMAGE ID CREATED SIZE
    docker.io/centos latest e934aafc2206 2 days ago 199 MB

    快,滋醒这个做梦的人,有糖尿病的往后靠靠哈,不要给他点甜头!
  • 相关阅读:
    RHEL7 安装Docker-CE
    Django2.2 Vue 前后端分离 无法访问Cookie
    Vue error: Parsing error: Unexpected token
    Python Warning
    Http post 接收 html .netcore
    Echart 中国地图
    CKplayer 视频播放插件
    (转)解决windows10下无法安装.net framework 3.5,错误代码0x800F081F
    第1章 信息化和信息系统
    .net core 添加 swagger
  • 原文地址:https://www.cnblogs.com/jianzhaojing/p/13336545.html
Copyright © 2011-2022 走看看