一.windows系统
1.先查看是否开启了虚拟化功能,没有开启的话需要在bios开启

2.打开“控制面板/程序”里的windows功能,选中Hyper-V,然后点击确定。然后需要重启下电脑

3.去docker官网下载安装包:https://docs.docker.com/docker-for-windows/install/

4.开始安装

?
?
5.运行后跳出弹窗,需要下载linux内核包,下载安装后再点击Restart按钮重启docker


?
?
6.打开docker,发现正常了。

7.登录阿里云,找到容器镜像服务的镜像加速器,将地址复制到docker设置里,还有一个地址是官方国内镜像加速地址:https://registry.docker-cn.com

?
8.配置参数

?
9.去阿里云注册个人容器镜像服务,这样就可以下载阿里云他人公开的镜像,并且自己也可以制作镜像上传到阿里云

?
?二.centos系统
1.先升级yum

2.如果安装过旧版本就先卸载:sudo yum remove docker docker-common docker-selinux docker-engine

3.安装需要的软件包:sudo yum install -y yum-utils device-mapper-persistent-data lvm2

4.设置yum源:sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo

5.可以查看所有仓库中所有docker版本,选择版本安装:sudo?yum list docker-ce --showduplicates | sort -r

6.安装docker:sudo yum install docker-ce(不带版本号默认最新版)


7.设置开机自启动并启动docker
sudo?systemctl?start?docker
sudo?systemctl?enable?docker

?
|