CentOS7怎么更改Docker配置文件

为了帮助大家排忧解难,下面小编整理了相关教程,感兴趣的小伙伴一起来看看吧!

3852f6e5eceeadbc3ee75cc7cd18dfdae53b7b63.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fquality%2Cq_80

工具/原料

  • magicbook
  • Windows11

方式/步骤

  1. 1

    图解CentOS 7下Docker的安装和验证因为Docker默认镜像的下载地址是国外的DockerHub,如下图所示

    de9bfa3b3b860221c89f88e1d8bbf82065fb7263.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  2. 2

    3、登录到阿里云开辟者办理后台cr.console.aliyun.com,点击左侧的镜像加快器,右侧会显示镜像加快器的地址,如下图所示:

    bf6e59704618dfda60f3203189214f5792567763.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  3. 3

    4、在etc目次下建立一个docker目次,号令为

    sudo mkdir -p /etc/docker

    9bc92713e8e5eceed274a598cc704618deda7a63.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  4. 4

    5、在docker目次下添加一个daemon.json文件,号令如下:

    e9a4f2eeadbcbe2fc6b85daf54dae43b3a867863.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  5. 5

    6、从头加载json文件,号令

    acfda02f477046185c12ff8cb08602214e577663.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  6. 6

    7、从头启动docker,号令

    46315818dfdae43bbe4e1996c457935652bb7463.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80
  7. 7

    8、此时若是时第一次运行docker hello-world的话,docker pull拉取hello-world镜像的速度就会加速良多,如下图所示:

    4759c1dae43b3b8684e954e0185653bbf9207563.jpg?x-bce-process=image%2Fresize%2Cm_lfit%2Cw_500%2Climit_1%2Fformat%2Cf_jpg%2Fquality%2Cq_80END
  • 发表于 2021-11-16 23:44
  • 阅读 ( 220 )
  • 分类:其他类型

相关问题

0 条评论

请先 登录 后评论