windows下docker使用及注意事项

1、windows container模式下,pull镜像会失败

no matching manifest for windows/amd64 in the manifest list entries

2、windows container模式下会存在问题,再次切换到linux container模式下,启动会出现问题

out of memory

3、解决memory问题

右击docker状态栏的图标,选择设置(settings),再将advanced下的memory从2048修改为1280,自动重启后即可成功启动。

4、docker默认下载的镜像基本上都是在国外,下载速度会非常缓慢,需要进行设置镜像加速

使用阿里云加速的方法:

1)登录阿里云镜像加速网站,登录成功后会出现个人专属加速器url

2)配置到docker配置文件

windows下的配置文件目录为:C:\ProgramData\Docker\config\daemon.json

{"registry-mirrors":["自己的专属url"],"insecure-registries":[], "debug":true, "experimental": true}

3)测试加速器是否设置成功

docker info

出现框出的参数即代表设置成功。

猜你喜欢

转载自www.cnblogs.com/icebutterfly/p/9066653.html