Docker之2.docker的安装和镜像加速
不通平台的docker的安装方式:
1.ubuntu-docker安装:
https://www.runoob.com/docker/ubuntu-docker-install.html
2.Debian Docker 安装:
https://www.runoob.com/docker/debian-docker-install.html
3.CentOS Docker 安装:
https://www.runoob.com/docker/centos-docker-install.html
4.Windows Docker 安装:
https://www.runoob.com/docker/windows-docker-install.html
5.MacOS Docker 安装
https://www.runoob.com/docker/macos-docker-install.html
通过命令查看一下docker是否安装好:
打开一个terminal,输入:docker -v,就会显示出安装的版本号
Docker 镜像加速
https://www.runoob.com/docker/docker-mirror-acceleration.html
其实主要就是将
- 网易:https://hub-mirror.c.163.com/
- 七牛云加速器:https://reg-mirror.qiniu.com
- 阿里云:https://<你的ID>.mirror.aliyuncs.com 建议自己可以注册一个
其实就是将一行:
"registry-mirrors": [
"https://你的id.mirror.aliyuncs.com",
"insicure-registries": [ip:port]
],
填入到里面
{
"experimental": true,
"registry-mirrors": [
"https://你的id.mirror.aliyuncs.com"
],
"features": {
"buildkit": true
},
"debug": true
}
还可以配置公司的镜像地址:"insicure-registries": [ip:port]
{
"experimental": true,
"registry-mirrors": [
"https://你的id.mirror.aliyuncs.com"
],
"insicure-registries": [ip:port]
],
"features": {
"buildkit": true
},
"debug": true
}