-
Notifications
You must be signed in to change notification settings - Fork 287
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added about MySQL
- Loading branch information
Keesun Baik (a.k.a, Whiteship)
authored
Jul 21, 2018
1 parent
251bc7e
commit 8e8a528
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,41 @@ | ||
|
||
### 컨테이너 상세 정보 보기 | ||
|
||
``` | ||
docker inspect sharp_bartik | ||
``` | ||
|
||
### 컨테이너 아이디 가져오기 | ||
|
||
``` | ||
CID=$(docker run -d monolith:1.0.0) | ||
``` | ||
|
||
### 컨테이너 아이피 가져오기 | ||
|
||
``` | ||
CID=$(docker run -d monolith:1.0.0) | ||
CIP=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' ${CID}) | ||
``` | ||
|
||
### 컨테이너 전부 멈추기 | ||
|
||
``` | ||
stop $(sudo docker ps -aq) | ||
``` | ||
|
||
### 컨테이너 전부 삭제 | ||
|
||
``` | ||
docker rm $(sudo docker ps -aq) | ||
``` | ||
|
||
### MySQL | ||
|
||
``` | ||
docker run -p 3306:3306 --name mysql_boot -e MYSQL_ROOT_PASSWORD=1 -e MYSQL_DATABASE=springboot -e MYSQL_USER=keesun -e MYSQL_PASSWORD=pass -d mysql | ||
docker exec -i -t mysql_boot bash | ||
mysql -u root -p | ||
``` |