阿林的博客
昨夜梦 今辰你 明日思 | Blog about life and learning.

【问题与处理】WSL中安装Docker遇到问题

  February 27, 2020 Docker    WSL   

今天按照这个教程使用WSL安装docker时遇到了个问题:

进一步测试发现其他命令也都不能使用

必应搜索一番之后找到了一些解决方案:例如这个博客

$ systemctl daemon-reload
$ sudo service docker restart
$ sudo service docker status

不过我在执行第一个命令时就出现了:

System has not been booted with systemd as init system (PID 1). Can't operate

后来找到了这个issue

@craigloewen-msft

“Instead of using sudo systemctl start docker use: sudo /etc/init.d/docker start , as of right now we do not have systemd in WSL 2.”

尝试了sudo /etc/init.d/docker start启动docker之后便不再出现片头那个问题

参考资料

https://github.com/MicrosoftDocs/WSL/issues/457

https://www.runoob.com/docker/ubuntu-docker-install.html

https://www.cnblogs.com/mmzs/p/12090197.html




如果有任何问题请联系我:troylin0218@gmail.com
采用 知识共享署名4.0 国际许可协议进行许可
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名
原文连接: https://troylin0218.github.io/Docker_install_problems.html

Powered by Jekyll · Theme based on solid and Randy's Blog
Made with ❤️ by TianLin