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。