win10子系统子系统ubuntu(WSL) 安装安装Docker的教程的教程(图文详解图文详解)
现在 Docker 有专门的 Win10 专业版系统的安装包,需要开启Hyper-V,具体开启方法文中给大家介绍的很详细,这篇文章主要介绍了
win10子系统ubuntu(WSL) 安装Docker,需要的朋友可以参考下
环境说明环境说明
环境:win10企业版 + ubuntu 18.04 LTS [WSL]
win10安装安装Docker for windows
现在 Docker 有专门的 Win10 专业版系统的安装包,需要开启Hyper-V。
开启开启 Hyper-V
程序和功能
启用或关闭Windows功能
选中Hyper-V
安装安装Docker for windows
最新版 Docker for windows
下载地址: https://docs.docker.com/v17.09/docker-for-windows/install/
点击 Get Docker for Windows [Stable],并下载 Windows 的版本:
安装完成后,Docker 会自动启动。通知栏上会出现个小鲸鱼的图标 ,这表示 Docker 正在运行。
桌边也会出现三个图标,入下图所示:
我们可以在命令行执行 docker version 来查看版本号,docker run hello-world 来载入测试镜像测试。
如果没启动,你可以在 Windows 搜索 Docker 来启动:
启动后,也可以在通知栏上看到小鲸鱼图标:
子系统安装子系统安装Docker安装安装
没啥问题
leenhem@DESKTOP-7SREO20:~$ sudo apt-get install docker.io
Reading package lists... Done
Building dependency tree
Reading state information... Done
docker.io is already the newest version (18.09.7-0ubuntu1~18.04.4).
0 upgraded, 0 newly installed, 0 to remove and 111 not upgraded.
使用 有问题 [无法正常使用]
官网释疑【解
leenhem@DESKTOP-7SREO20:~$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
leenhem@DESKTOP-7SREO20:~$ sudo /etc/init.d/docker status
* Docker is not running
leenhem@DESKTOP-7SREO20:~$ sudo /etc/init.d/docker start
* Starting Docker: docker [ OK ]
leenhem@DESKTOP-7SREO20:~$
leenhem@DESKTOP-7SREO20:~$ sudo /etc/init.d/docker status
* Docker is running
leenhem@DESKTOP-7SREO20:~$ sudo /etc/init.d/docker status
* Docker is not running
你会发现这个Docker怎么都启动不了,那现在怎么办?一定要先看日志(/var/log/docker.log )
leenhem@DESKTOP-7SREO20:~$ tail /var/log/docker.log -n 100
评论0