首页 > 系统相关 >Windows wsl2安装Docker

Windows wsl2安装Docker

时间:2023-02-25 16:36:23浏览次数:47  
标签:daemon Windows 安装 hello world Docker wsl2 docker

wsl2的Ubuntu安装好后,就可以安装Docker了。

由于众所周知的原因,国内访问国外的某些网站会访问不了或者访问极慢,Docker的安装网站就在其中。

所以推荐使用阿里的镜像进行安装。

1、使用官方脚本自动安装。

curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun

2、检验安装结果。

docker -v

显示如下结果代表Docker 安装成功:

Docker version 23.0.1, build a5ee5b1

3、查看Docker状态。

systemctl status docker

4、启动Docker。

systemctl start docker

5、运行hello-world测试。

docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:6e8b6f026e0b9c419ea0fd02d3905dd0952ad1feea67543f525c73a0a790fefb
Status: Downloaded newer image for hello-world:latest

Hello 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 the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share 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/

出现了Hello from Docker提示则代表Docker运行正常了。


版本

Windows 10 专业版 22H2

Ubuntu 20.04

Docker 23.0.1

标签:daemon,Windows,安装,hello,world,Docker,wsl2,docker
From: https://www.cnblogs.com/codesail/p/17154700.html

相关文章

  • Windows wsl2支持systemd
    背景很多Linux发行版都是使用systemd来管理程序进程,但是在WSL中默认是用init来管理进程的。为了符合长久的使用习惯,且省去不必要的学习成本,就在WSL的发行版(我这里安装的......
  • 转:修改当前docker的shm-size
    修改当前docker的shm-size (推荐)共享内存简介及docker容器的shm设置与修改 ......
  • Docker 自动启动和容器自动启动
    一、docker 服务启动启动#开启docker自启动systemctlenabledocker.service#关闭docker自启动systemctldisabledocker.service二、docker容器自动启动#......
  • windows-win+快捷键用不了
    win10按win+e、win+r、win+d等win键无反应原因:win键盘被锁解决方式fn+win解锁win键即可(如果按过无反应,连按两次三次尝试即可)依旧无反应尝试fn+F2、fn+F6、fn+键盘......
  • Podman 和 Docker 区别对比
    1.docker需要在我们的系统上运行一个守护进程(dockerdaemon),而podman不需要2.启动容器的方式不同:dockercli命令通过API跟DockerEngine(引擎)交互告诉它我想创建一个c......
  • Windows黑客编程之进程伪装
    描述通过NtQueryInformation函数获取进程信息,并修改peb参数,可以欺骗ProcMon等查看进程信息的工具,将其伪装成一个看起来无害的进程代码实现NtQueryInformationProces......
  • docker基础与概念
    什么是dockerDocker使用Google公司推出的Go语言进行开发实现,基于Linux内核的cgroup,namespace,对进程进行封装隔离,属于操作系统层面的虚拟化技术。由于隔离的进程独立于宿......
  • java——spring boot集成RabbitMQ——windows本地安装和运行
    思维导图  一、什么是消息队列消息指的是两个应用间传递的数据。数据的类型有很多种形式,可能只包含文本字符串,也可能包含嵌入对象。 “消息队列(MessageQueue)......
  • 【windows】测试获取进程资源占用的API的性能消耗
    背景一次性获取所有进程信息的API:NtQuerySystemInformation分别获取进程的cpu、mem、io的API:GetProcessTimes、GetProcessMemoryInfo、GetProcessIoCounters如果关注......
  • Windows黑客编程之Bypass UAC
    描述用管理员权限运行CompMgmtLauncher.exe,由于它是白名单程序,不会被UAC拦截,可以直接以管理员权限运行CompMgmtLauncher的功能是去遍历指定注册表路径下的程序,并启动只......