關於Docker在ubuntu上發生的恐怖故事解決方法
先說故事,昨天輸入一個指令後Docker爆掉,
這是一個關於刪除Docker再重新安裝的故事~
(我的images container都沒有備份,Docker壞掉後,我氣到哭,昨天心態整個崩潰...
睡覺的時候氣到手會不自主的搥床,真的很難過...)
參考文獻:
安裝 docker
https://cloud.tencent.com/developer/article/1350956
解除安裝 docker
https://bbs.mnya.tw/d/8343-ubuntu-wan-zheng-jie-chu-an-zhuang-docker-jiao-xue
ubuntu@ubuntu:~/scrapy$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial
💛解除安裝 docker
ubuntu@ubuntu:~/trans_project/flask$ dpkg -l | grep -i docker
ubuntu@ubuntu:~/trans_project/flask$ sudo apt-get purge docker-ce
bash: /usr/bin/docker: 沒有此一檔案或目錄
💛安裝 docker
ubuntu@ubuntu:~/scrapy$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
[sudo] password for ubuntu:
OK
ubuntu@ubuntu:~/scrapy$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
ubuntu@ubuntu:~/scrapy$ sudo apt-get install -y docker-ce
ubuntu@ubuntu:~/scrapy$ sudo systemctl status docker
ubuntu@ubuntu:~/scrapy$ docker --version
😥遇到大魔王🙈
ubuntu@ubuntu:~/scrapy$ docker images
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/images/json: dial unix /var/run/docker.sock: connect: permission denied
ubuntu@ubuntu:~/scrapy$ docker ps
Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.24/containers/json: dial unix /var/run/docker.sock: connect: permission denied
ubuntu@ubuntu:~/scrapy$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ubuntu@ubuntu:~/scrapy$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
沒有留言:
張貼留言
喜歡我的文章嗎? 喜歡的話可以留言回應我喔! ^^