개요
작은 프로젝트를 해보기 위해 내 맥북에 도커를 설치해 컨테이너를 띄우려고 하는 상황에서 발생한 에러이다.
해결한 방법을 공유하고자 한다.
brew install docker
홈브루를 통해 도커를 설치했고 mysql 이미지를 pull 해서 사용하려 했는데 다음과 같은 에러가 계속해서 떴다.
우분투 환경에서는 systemctl을 통해서 상태를 확인하고 start를 해주면 그만이지만 mac 환경에는 systemctl이 없다.
그래서 다음과 같은 방법을 통해 문제를 해결했다.
해결 방법
Mac 환경에서 터미널을 통해 docker를 사용하려면 docker desktop on mac 어플리케이션을 설치해주면 된다.
그래서 어디가서 설치하면 되냐? 하면 그럴 필요 없다. brew 명령어를 통하여 다음과 같이 설치해주면 한번에 알아서 다 설치해준다.
brew install --cask docker
--cask 같은 옵션의 경우에 GUI 어플리케이션을 설치할 때 주로 사용되는 옵션이다.
해당 명령어를 통해 설치가 된 화면이다. 여기서 끝나는게 아니라 도커를 실행해주도록 한다.
도커 계정으로 로그인을 한 화면이다. 이렇게 실행을 하게 되면 상단 바에 아래와 같이 실행 중 이라는 표시가 뜨게 된다.
이 상태에서 터미널을 통해 도커 명령어를 실행해보면 정상적으로 동작하는 것을 볼 수 있다.
임의의 이미지를 pull 해보면 정상적으로 동작한다.
'Dev > Etc' 카테고리의 다른 글
[Mac] OS update 후 xcrun: error: invalid active developer path 문제 해결하기 (0) | 2023.11.23 |
---|---|
[Mac] 설정을 통해 간편하게 SSH 접속하기 (0) | 2023.10.03 |