之前不小心误操作删除重装docker,结果删除没成功,更没法重装,每次apt install都会报一个docker错误,
? Process: 32174 ExecStart=/usr/bin/dockerd --graph=/home/hxb/docker/lib/docker (code=exited, status=1/FAILURE)
?
虽然不影响软件的常规安装~但是现在还是需要装一个完整docker,还是选择删除一下,重点是关闭服务,关闭服务就好卸载了。
sudo systemctl stop docker
sudo apt-get purge docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
sudo rm -rf /etc/docker
sudo groupdel docker
sudo rm /etc/apt/sources.list.d/docker.list
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt update
sudo apt install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo docker run hello-world
?
$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
$ systemctl status docker.service
● docker.service - Docker Application Container Engine
? ?Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
? Drop-In: /etc/systemd/system/docker.service.d
? ? ? ? ? ?└─devicemapper.conf
? ?Active: failed (Result: exit-code) since Tue 2023-12-26 11:32:09 CST; 6s ago
? ? ?Docs: https://docs.docker.com
? Process: 34510 ExecStart=/usr/bin/dockerd --graph=/home/hxb/docker/lib/docker (code=exited, status=1/FAILUR
?Main PID: 34510 (code=exited, status=1/FAILURE)
?