zoukankan      html  css  js  c++  java
  • docker 设置阿里镜像源

    安装参考:centos7下安装docker

    1.现象

    如果直接docker pull centos 两个小时才down下来8M,很慢

    2.解决

    [root@localhost network-scripts]# cd /etc/docker
    [root@localhost docker]# ls
    certs.d  daemon.json  key.json  seccomp.json
    [root@localhost docker]# cat daemon.json 
    {}
    [root@localhost docker]# vi daemon.json 
    
    {
    "registry-mirrors": ["https://mj9kvemk.mirror.aliyuncs.com"]
    }

    重启docker

    [root@localhost docker]# service docker restart
    Redirecting to /bin/systemctl restart docker.service
    [root@localhost docker]# 

    重新拉取,秒秒钟

    [root@localhost docker]# docker pull centos
    Using default tag: latest
    Trying to pull repository docker.io/library/centos ... 
    latest: Pulling from docker.io/library/centos
    8ba884070f61: Pull complete 
    Digest: sha256:8d487d68857f5bc9595793279b33d082b03713341ddec91054382641d14db861
    Status: Downloaded newer image for docker.io/centos:latest
    [root@localhost docker]# 

     3.验证

    [root@localhost docker]# docker images
    REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
    docker.io/centos    latest              9f38484d220f        10 days ago         202 MB
    [root@localhost docker]# 
  • 相关阅读:
    多选菜单shell脚本
    获取nginx日志状态码百分比脚本
    Linux内核参数优化
    deploy.sh
    Docker常用命令速查
    Docker架构
    修改Docker默认存储路径
    redis安装与基本使用
    js实现汉字转拼音
    android:Android 6.0+ 权限控制代码封装
  • 原文地址:https://www.cnblogs.com/pu20065226/p/10594444.html
Copyright © 2011-2022 走看看