关于vulhub环境报错问题

最近在Ubuntu上搭建vulhub环境时在运行:

ubuntu@ubuntu:docker-compose up -d

报错:

ERROR: Couldn't connect to Docker daemon at http+docker://localhost - is it running?

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

在网上找了很多教程找解决方式,效果都不是很好,不过运气还不差有一个方法解决了这个问题:

1、将当前用户加入docker组

ubuntu@ubuntu:sudo gpasswd -a ${USER} docker

2、重启docker服务

ubuntu@ubuntu:sudo systemctl restart docker

3、切换会话

ubuntu@ubuntu:newgrp - docker

提示:本文并非原创,因为找了很多方法浪费了很多时间才解决的问题所以将原作者的文章做一个推广,给大家提供一个好的解决方法,如果原作者不同意请联系删除。

原文连接:https://www.cnblogs.com/360minitao/p/12179629.html

猜你喜欢

转载自www.cnblogs.com/twlr/p/12546584.html
今日推荐