Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- 코테
- 다시보기
- 알고리즘기본개념
- 알고리즘
- Union Find
- 기본유형
- BFS
- 그래프
- Spring
- 완전탐색
- 코딩테스트실력진단
- 그리디
- 유니온파인드
- SWEA
- SSAFY
- DFS
- 부분수열의합2
- 트러블슈팅
- 싸피
- JUnit
- database
- DP
- 코딩테스트
- 완탐
- 코드트리
- 자바
- JPA
- 다익스트라
- 백준
- Java
Archives
- Today
- Total
HwangHub
[트러블슈팅] cannot connect to a docker daemon 본문
다음 내용은 송곳매 프로젝트 진행 중에 발생한 이슈를 해결한 내용입니다.
ubuntu 환경의 ec2에 docker를 이용하여 배포를 하려고 docker를 나름대로 설치하고 docker ps를 수행했는데 다음과 같은 에러가 발생하였다.
$ docker ps
Cannot connect to the Docker daemon at unix:///var/run/docker.sock.
Is the docker daemon running?
알아보니 systemctl status docker 를 통해 체크해보면 대부분 아래와 같이 docker가 ec2 컴퓨터 내에서 실행되고 있지 않아서 그렇다고 한다.
$ systemctl status docker
docker.service - Docker Application Container Engine
Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
Active: inactive (dead)
Docs: https://docs.docker.com
여기서 많은 한국 블로그들은 systemctl enable docker를 통해 해결했다고 한다.
하지만 나는 그렇게 해결되지 않았다.
따라서 조금 더 알아보다가 baeldung에서 답을 얻을 수 있었다.
명령어는 systemctl start docker 를 입력하면 docker가 정상적으로 실행되었고, 이를 통해 도커를 사용할 수 있게 되었다.
$ systemctl start docker
확실히 docker가 동작하는지 확인하기 위해 docker run hello-world를 하니 아래와 같이 response를 얻을 수 있었다.
$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
719385e32844: Pull complete
Digest: sha256:88ec0acaa3ec199d3b7eaf73588f4518c25f9d34f58ce9a0df68429c5af48e8d
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
보다시피 아주 잘 돌아간다.
해결해서 기분이 좋다.
'DEV-STUDY > Infra' 카테고리의 다른 글
[JIRA] 지라/슬랙/깃허브 연동을 통한 프로젝트 관리 시작하기 (0) | 2023.11.07 |
---|---|
[CD] 깃허브 액션으로 배포 자동화 시스템 구축하기 (1) | 2023.10.30 |
AWS EC2(우분투)에 도커 이미지 배포하기 (0) | 2023.08.17 |
도커 컴포즈란? (0) | 2023.07.24 |
Working Directory 명시하기 (0) | 2023.07.23 |
Comments