상태를 보면 다음과 같이 도커는 문제없이 active 상태이지만, 빌드에 실패할 때가 있다.
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-01-23 11:51:01 KST; 1min 6s ago
Docs: https://docs.docker.com
Main PID: 25391 (dockerd)
Tasks: 10
CGroup: /system.slice/docker.service
└─25391 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
이때는 간단하게 다음 스텝을 따라가주자.
Docker 서비스 종료
여기서 중요한건 docker만 종료하면 안된다. 반드시 소켓이랑 컨테이너도 종료해주자.
sudo systemctl stop docker
sudo systemctl stop containerd
sudo systemctl stop docker.socket
Docker 재시작
sudo systemctl start docker
$ sudo systemctl status docker
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: active (running) since Tue 2024-01-23 11:51:01 KST; 1min 6s ago
Docs: https://docs.docker.com
Main PID: 25391 (dockerd)
Tasks: 10
CGroup: /system.slice/docker.service
└─25391 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock