博主
258
258
258
258
专辑

第四节 运行第一个Docker镜像

亮子 2021-06-08 01:36:24 7351 0 0 0

1、阿里云镜像加速配置

1)、注册阿里云开发账号

https://cr.console.aliyun.com/cn-beijing/new

https://promotion.aliyun.com/ntms/act/kubernetes.html

2)、使用阿里云镜像加速地址

图片alt

CentOS7的配置文件:
/etc/docker/daemon.json

创建配置文件并添上如下内容

{
  "registry-mirrors": ["https://9fzy4xpk.mirror.aliyuncs.com"]
}

再执行如下命令:

sudo systemctl daemon-reload
sudo systemctl restart docker

2、运行hello-world镜像

docker run hello-world

图片alt