您的位置:首页 > 新闻 > 会展 > windows 安装docker

windows 安装docker

2025/1/9 9:29:46 来源:https://blog.csdn.net/u010933908/article/details/140017076  浏览:    关键词:windows 安装docker

一、安装步骤

Windows Docker 安装 | 菜鸟教程

二、本地环境

操作系统:windows11

网络环境:科学上网

三、资源下载

稍后放到网盘后给出下载链接

四、版本信息

$ docker version
Client:Version:           26.1.4API version:       1.45Go version:        go1.21.11Git commit:        5650f9bBuilt:             Wed Jun  5 11:29:54 2024OS/Arch:           windows/amd64Context:           desktop-linuxServer: Docker Desktop 4.31.1 (153621)Engine:Version:          26.1.4API version:      1.45 (minimum version 1.24)Go version:       go1.21.11Git commit:       de5c9cfBuilt:            Wed Jun  5 11:29:22 2024OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.6.33GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957runc:Version:          1.1.12GitCommit:        v1.1.12-0-g51d5e94docker-init:Version:          0.19.0GitCommit:        de40ad0

五、遇到的问题

1、docker run hello-world身份验证错误

问题现象:

$: docker run hello-world
Unable to find image 'hello-world:latest' locally
docker: Error response from daemon: Head "https://registry-1.docker.io/v2/library/hello-world/manifests/latest": unauthorized: incorrect username or password.
See 'docker run --help'.

问题原因:

Docker hello-world:身份验证错误-腾讯云开发者社区-腾讯云

解决方案:

执行docker login 重新登陆后再次执行docker run hello-world,运行成功

2、解决镜像获取失败问题

问题现象:

$ docker run -i -t ubuntu:15.10 /bin/bash
Unable to find image 'ubuntu:15.10' locally
15.10: Pulling from library/ubuntu
7dcf5a444392: Retrying in 1 second
759aa75f3cee: Retrying in 1 second
3fa871dc8a2b: Retrying in 1 second
224c42ae46e7: Waiting
docker: error pulling image configuration: download failed after attempts=6: dialing production.cloudflare.docker.com:443 container via direct connection because  has no HTTPS proxy: connecting to 108.160.165.212:443: dial tcp 108.160.165.212:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
See 'docker run --help'.

问题原因:梯子坏了

解决方案:切换为阿里云镜像

针对安装了Docker for Windows的用户,您可以参考以下配置步骤:

在系统右下角托盘图标内右键菜单选择 Settings,打开配置窗口后左侧导航菜单选择 Docker Daemon。编辑窗口内的JSON串,填写下方加速器地址:

{"registry-mirrors": ["https://{你的ID}.mirror.aliyuncs.com"]
}

编辑完成后点击 Apply 保存按钮,等待Docker重启并应用配置的镜像加速器。

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com