다디와 괴발개발

[Docker] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 해결 본문

TroubleShooting

[Docker] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running? 해결

아임다디 2022. 4. 11. 18:24

상황

프로젝트에서 docker compose up으로 이미지를 만드는 과정에서 이러한 오류가 발생하였다

ERRO[0000] Can't add file /Users/seongah/Github/devops-01-P2-TeamB/.git/hooks/prepare-commit-msg.sample to tar: io: read/write on closed pipe ERRO[0000] Can't close tar writer: io: read/write on closed pipe Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

원인

Is the docker daemon running? 이란 내용 때문에 노트북의 Docker Desktop이 실행되고 있지 않아서 발생한 오류인 것으로 추정되었다

해결

Docker Desktop을 실행한 뒤, 얼마 뒤에 다시 compose 명령을 실행하니 에러 없이 정상적으로 작동되는 것을 확인할 수 있었다.

소프트웨어를 실행시켜도 바로 안된다고 헤매지말고 조금 기다리면 분명 에러가 사라질 것이다!