도커 환경에서 MySQL 설치 및 접속
macOS 기준으로 도커 환경에서 MySQL 설치 및 접속에 대한 가이드를 제공한다.
1. 도커 설치
2. MySQL 이미지 다운로드
$ docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
1817bc1e6309: Pull complete
740bd54462bc: Pull complete
a7e5ed4e69b3: Pull complete
8fdf88d7bbb7: Pull complete
a1a5f8560950: Pull complete
82b514ba21a5: Pull complete
d6a4cb36f5f9: Pull complete
3392803e2ec5: Pull complete
dcc1a15c36b9: Pull complete
3e1c4ca2fc97: Pull complete
Digest: sha256:6a5dbd2819e36048669639811461f27fee48da1e22039e5d31f4273a20d542f6
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest$ docker pull mysql:8.0.34
8.0.34: Pulling from library/mysql
1817bc1e6309: Already exists
740bd54462bc: Already exists
a7e5ed4e69b3: Already exists
8fdf88d7bbb7: Already exists
a1a5f8560950: Already exists
6d2014e71aa1: Pull complete
a65eef362898: Pull complete
1086465c0f61: Pull complete
6d718a732c3a: Pull complete
c724fd4b412f: Pull complete
74fcbdd515b3: Pull complete
Digest: sha256:51c4dc55d3abf4517a5a652794d1f0adb2f2ed1d1bedc847d6132d91cdb2ebbf
Status: Downloaded newer image for mysql:8.0.34
docker.io/library/mysql:8.0.343. MySQL 도커 이미지로 컨테이너 생성 및 실행
4. 실행중인 도커 컨테이너 리스트 출력
5. 실행중인 MySQL 도커 컨테이너 접속
Last updated