도커에서 젠킨스 컨테이너를 만들어 실행하고, 컨테이너 내부에 다시 도커를 설치해서 실행하려고 하였는데
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
위 메시지가 떴다.
docker의 status를 확인하니 실행 중이지 않았다.
해결책으로
$ sudo systemctl start docker
$ sudo service docker start
를 해도 여전히 docker를 실행시킬 수 없었다.
찾아보니 우분투에서 발생하는 문제인 것 같았다.
다른 해결 방안으로 dockerd가 있었다.
https://docs.docker.com/engine/reference/commandline/dockerd/
dockerd
docs.docker.com
dockerd is the persistent process that manages containers. Docker uses different binaries for the daemon and client. To run the daemon you type dockerd.
dockerd는
API 요청을 수신하고 이미지, 컨테이너, 네트워크 및 볼륨과 같은 Docker 객체를 관리합니다.
https://velog.io/@weekbelt/%EB%8F%84%EC%BB%A4%EB%8D%B0%EB%AA%ACDocker-Daemon
dockerd를 실행하려고 하였는데도 문제가 발생해서, 찾아보았다
https://github.com/microsoft/WSL/issues/6655
WSL2 Kernel do not support `nftables` and causing docker failed to start up in Ubuntu 20.10+ · Issue #6655 · microsoft/WSL
Environment Windows build number: 21327 Your Distribution version: Ubuntu Hirsute Hippo (development branch) Whether the issue is on WSL 2 and/or WSL 1: WSL2 Steps to reproduce Installing Ubuntu 20...
github.com
sudo update-alternatives --set iptables /usr/sbin/iptables-legacy
sudo update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
sudo dockerd &
위 명령어를 통해 다시 빌드를 진행하니까 docker를 실행할 수 있었다
'Trouble Shootings' 카테고리의 다른 글
[Spring Boot & MySQL] 날짜 타입 저장하기 (LocalDateTime, Timestamp) (0) | 2023.01.31 |
---|---|
[Spring Boot] Java DateTime Json 입력 시 400 error (0) | 2023.01.29 |
[스프링] Spring messages.properties 한글 인코딩 (0) | 2022.12.23 |
[Vue.js] vue 이미지 src 동적 연결 (v-bind) (0) | 2022.11.20 |
[Vue.js] .env .local 값을 못 읽을 때 (403 error) (0) | 2022.11.20 |