当前位置: 首页 > news >正文

windows docker-01-desktop install windows10 + wls2 启用

windows10 安装 docker

版本信息确认

需要区分 windows 是 amd64 还是 arm64

powershell 中执行:

> echo $env:PROCESSOR_ARCHITECTURE
AMD64

下载

官方 https://www.docker.com/products/docker-desktop/ 下载

windows amd64

下载好了直接安装。

如何验证

powershell 中 docker version

$   docker versionClient:Version:           28.3.2API version:       1.51Go version:        go1.24.5Git commit:        578ccf6Built:             Wed Jul  9 16:12:31 2025OS/Arch:           windows/amd64Context:           desktop-linuxServer: Docker Desktop 4.43.2 (199162)Engine:Version:          28.3.2API version:      1.51 (minimum version 1.24)Go version:       go1.24.5Git commit:       e77ff99Built:            Wed Jul  9 16:13:55 2025OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.7.27GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4darunc:Version:          1.2.5GitCommit:        v1.2.5-0-g59923efdocker-init:Version:          0.19.0GitCommit:        de40ad0

入门例子

镜像运行

> docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
e6590344b1a5: Pull complete
Digest: sha256:ec153840d1e635ac434fab5e377081f17e0e15afab27beb3f726c3265039cfff
Status: Downloaded newer image for hello-world:latestHello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:1. The Docker client contacted the Docker daemon.2. The Docker daemon pulled the "hello-world" image from the Docker Hub.(amd64)3. The Docker daemon created a new container from that image which runs theexecutable that produces the output you are currently reading.4. The Docker daemon streamed that output to the Docker client, which sent itto your terminal.To try something more ambitious, you can run an Ubuntu container with:$ docker run -it ubuntu bashShare images, automate workflows, and more with a free Docker ID:https://hub.docker.com/For more examples and ideas, visit:https://docs.docker.com/get-started/

查看

> docker ps -a
CONTAINER ID   IMAGE         COMMAND    CREATED          STATUS                      PORTS     NAMES
2cb5aa698d2b   hello-world   "/hello"   30 seconds ago   Exited (0) 29 seconds ago             musing_villani

wsl2 中如何使用呢?

默认选择 WSL2,这里发现可以直接使用。

WSL 中执行:

$ docker version
Client:Version:           28.3.2API version:       1.51Go version:        go1.24.5Git commit:        578ccf6Built:             Wed Jul  9 16:12:50 2025OS/Arch:           linux/amd64Context:           defaultServer: Docker Desktop 4.43.2 (199162)Engine:Version:          28.3.2API version:      1.51 (minimum version 1.24)Go version:       go1.24.5Git commit:       e77ff99Built:            Wed Jul  9 16:13:55 2025OS/Arch:          linux/amd64Experimental:     falsecontainerd:Version:          1.7.27GitCommit:        05044ec0a9a75232cad458027ca83437aae3f4darunc:Version:          1.2.5GitCommit:        v1.2.5-0-g59923efdocker-init:Version:          0.19.0GitCommit:        de40ad0
http://www.dtcms.com/a/287433.html

相关文章:

  • 加法速算之尾数法
  • 语音识别技术:从声音到文字的 AI 魔法
  • 多云联邦集群管理(1)(集群联邦管理)
  • 基于大模型打造故障预警服务器巡检机器人
  • World of Warcraft [CLASSIC] The Ruby Sanctum [RS] Halion
  • 【C# in .NET】19. 探秘抽象类:具体实现与抽象契约的桥梁
  • 用逻辑回归(Logistic Regression)处理鸢尾花(iris)数据集
  • 【专业扫盲】源极退化电阻
  • min_25筛学习笔记+牛客多校02E
  • NumPy 30分钟速成计划
  • 【运维心得】老旧系统迁移到虚拟机的另类解决
  • 力扣刷题(第九十二天)
  • nodejs值process.kill
  • 【RK3576】【Android14】固件烧录
  • 13.多种I/O函数
  • WPF为启动界面(Splash Screen)添加背景音乐
  • simulink系列之汽车应用层信号处理
  • android studio libs.versions.toml 配置
  • 计算机网络——IPv4(25王道最新版)
  • 从丢包到恢复:TCP重传机制的底层逻辑全解
  • Java-77 深入浅出 RPC Dubbo 负载均衡全解析:策略、配置与自定义实现实战
  • nginx.conf模版
  • 使用DataGrip连接安装在Linux上的Redis
  • Datawhale AI数据分析 作业
  • TinyMCE 富文本编辑器在 vue2 中的使用 @tinymce/tinymce-vue
  • Django母婴商城项目实践(八)- 数据渲染与显示之首页
  • windows wsl2-05-docker 安装笔记
  • Vue 3 中封装并使用 IndexedDB 的完整教程(含泛型、模块化、通用 CRUD)
  • 【C# in .NET】20. 探秘静态类:抽象与密封的结合体
  • Spring AI 1.0版本 + 千问大模型之 文本记忆对话