基于Windows Subsystem for Linux (WSL) 【Ubuntu】在WIN10 Home Edition安装Docker

root@Andy-PC:~# uname -a
Linux Andy-PC 4.4.0-17134-Microsoft #48-Microsoft Fri Apr 27 18:06:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
apt install docker
docker --help
apt install docker-compose
docker-compose --help

 

root@Andy-PC:/mnt/d/Download/MockSecKill-master# docker-compose bundle
ERROR: Couldn't connect to Docker daemon at http+docker://localunixsocket - is it running?

If it's at a non-standard location, specify the URL with the DOCKER_HOST environment variable.

 

这个方法,未重启貌似无效。

apt install cgroup-bin

 https://blog.csdn.net/x_i_y_u_e/article/details/44704289

 

参考错误:

https://github.com/Microsoft/WSL/issues/2291

https://forums.docker.com/t/error-when-running-docker-compose-couldnt-connect-to-docker-daemon-at-http-docker-localunixsocket/43803

 

 

如下方法(可能无效):

https://stackoverflow.com/questions/32002882/error-starting-docker-daemon-on-ubuntu-14-04-devices-cgroup-isnt-mounted

https://teguhsatria.com/2017/06/21/error-starting-daemon-devices-cgroup-isnt-mounted/

https://github.com/docker/compose/issues/4181

 

可能有效(未尝试):

http://www.cnblogs.com/jackluo/p/5441888.html

 

相关版本信息

root@Andy-PC:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

root@Andy
-PC:~# uname -a Linux Andy-PC 4.4.0-17134-Microsoft #112-Microsoft Thu Jun 07 22:57:00 PST 2018 x86_64 x86_64 x86_64 GNU/Linux
root@Andy
-PC:~# dockerd INFO[0000] libcontainerd: new containerd process, pid: 56 WARN[0000] containerd: low RLIMIT_NOFILE changing to max current=1024 max=65536 INFO[0001] [graphdriver] using prior storage driver: overlay2 INFO[0001] Graph migration to content-addressability took 0.00 seconds WARN[0001] Your kernel does not support cgroup memory limit WARN[0001] Unable to find cpu cgroup in mounts WARN[0001] Unable to find blkio cgroup in mounts WARN[0001] Unable to find cpuset cgroup in mounts WARN[0001] mountpoint for pids not found Error starting daemon: Devices cgroup isn't mounted

 

https://serverfault.com/questions/767994/can-you-run-docker-natively-on-the-new-windows-10-ubuntu-bash-userspace

As of September 2016, No.

All current implementations of Docker on Windows use virtualisation, Docker 1.12 uses a hypervisor in Windows -thus removing the advantage of containerisation over virtualisation.

Docker needs more than just using Linux systems calls.

It needs process control groups (cgroups), a stackable filesystem (aufs), plus other Linux-based systems outside the kernel.

Neither cgroups nor aufs are natively in the Windows 10 kernel.

There is an implementation of Windows Server 2016 here: https://msdn.microsoft.com/en-gb/virtualization/windowscontainers/quick_start/quick_start_windows_server ..but this will only run some Windows services, e.g. IIS, and not Ubuntu

 

初步结论:应该WIN10内核无法完全模拟Linux的cgroup和aufs组件。

 

官网释疑:

[Cross Post] WSL Interoperability with Docker

https://blogs.msdn.microsoft.com/commandline/2017/12/08/cross-post-wsl-interoperability-with-docker/

https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly

apt install screenfetch

screenfetch

待验证脚本:https://files.cnblogs.com/files/rgqancy/WSL.js,下载后另存为txt。

转载于:https://www.cnblogs.com/rgqancy/p/9179220.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值