windows 安装docker

一、安装步骤

Windows Docker 安装 | 菜鸟教程

二、本地环境

操作系统:windows11

网络环境:科学上网

三、资源下载

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

四、版本信息

$ docker version
Client:
 Version:           26.1.4
 API version:       1.45
 Go version:        go1.21.11
 Git commit:        5650f9b
 Built:             Wed Jun  5 11:29:54 2024
 OS/Arch:           windows/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.31.1 (153621)
 Engine:
  Version:          26.1.4
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.11
  Git commit:       de5c9cf
  Built:            Wed Jun  5 11:29:22 2024
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.6.33
  GitCommit:        d2d58213f83a351ca8f528a95fbd145f5654e957
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        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重启并应用配置的镜像加速器。

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值