当前位置: 首页 > 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.lryc.cn/news/593362.html

相关文章:

  • LangGraph教程6:LangGraph工作流人机交互
  • 博图SCL语言中常用运算符使用详解及实战案例(下)
  • LangGraph教程10:LangGraph ReAct应用
  • Python Pandas读取Excel表格中数据并根据时间字段筛选数据
  • 月舟科技近调记录
  • 网络爬虫概念初解
  • ndexedDB 与 LocalStorage:全面对比分析
  • C++数据结构————集合
  • 【Keil5-map文件】
  • 阿里云服务器 CentOS 7 安装 MySQL 8.4 超详细指南
  • c#泛型集合(ArrayList和List、Dictionary的对比)
  • 每日面试题09:进程、线程、协程的区别
  • 48Days-Day03 | 删除公共字符,两个链表的第一个公共结点,mari和shiny
  • 【每日算法】专题十五_BFS 解决 FloodFill 算法
  • HD Video Converter Factory pro 高清视频转换器 v27.7.0 绿色中文便携版
  • 【2025最新】 .NET FrameWork微软离线运行库合集,一键安装版
  • Spring之【AnnotatedBeanDefinitionReader】
  • 前端面试专栏-工程化:28.团队协作与版本控制(Git)
  • Baumer工业相机堡盟工业相机如何通过YoloV8深度学习模型实现动物分类(C#源码,UI界面版)
  • Selenium 中 findElement 方法全解析:定位网页元素的 7 种方式
  • RPC(Remote Procedure Call,远程过程调用)介绍
  • 探秘边缘安全架构设计要点解析
  • 深入了解 find_element 方法:Web 自动化定位元素的核心​
  • Node.js特训专栏-实战进阶:17.会话管理与安全存储
  • 开发框架安全ThinkPHPLaravelSpringBootStruts2SpringCloud复现
  • SLAM中的非线性优化-2D图优化之激光SLAM基于优化的前端匹配(十八)
  • KVM中使用桥接模式.运维就业技术教程
  • 零基础学习性能测试-linux服务器监控:CPU监控
  • 【RK3576】【Android14】USB开发调试
  • 《Spring Boot 插件化架构实战:从 SPI 到热插拔的三级跳》