728x90
반응형
Docker MYSQL , PHPMYADMIN
step 1. download the MYSQL repo using this command line:
docker pull mysql:lastet
Prepare a local folder on my NAS.
For example in '/volume1/docker/mysql'.
Start MYSQL container:
docker run -d \
--name some-mysql \
-v /volume1/docker/mysql:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=my-secret-pw \
-p 3306:3306 \
mysql:latest
You have to do port forwarding as necessary.
step 2 download the phpMyadmin repo using this command line:
docker pull phpmyadmin/phpmyadmin:latest
미리 mysql contanier ip 를 알아두어야 한다.
방법은 portainer에 접속 mysql container -> Connected networks
부분에서 확인 가능.
docker run -d \
--name phpmyadmin \
-p want_port:80 \ change the left value to a custom port if you wish/need to
-e PMA_PORT=same port as your MYSQL instance \ (3306 for example)
-e PMA_HOST=mysql container ip \
phpmyadmin/phpmyadmin:latest
728x90
step 3 phpMyadmin 네트워크 묶기
portainer 에 접속하여
phpMyadmin container -> Connected networks
에서
Mysql container 와 같은 network에 join a network를 한다.
이후 http://nasip:want_port
로 접속하면 사용이 가능하다.
End
⊙^⊙ Thank For Reading | Happy Coding ⊙-⊙
Setapp on Mac invite link flutterkage2k
The referrer gets a free month, up to a maximum of six months, for each friend who creates an account and signs in on their Mac.
도움이 되셨다면, 커피 한잔 사주세요
300x250
반응형
'Synology > Docker(in Synology)' 카테고리의 다른 글
[docker] Nextcloud does not redirect to dashboard after successful login (0) | 2021.10.15 |
---|---|
[Docker] archivebox public false (using portainer) (0) | 2021.10.02 |
[Docker] archivebox add first user (using portainer) (0) | 2021.05.22 |
[Docker] Calibre-web 온라인 도서 관리 (0) | 2021.05.16 |
[Docker] Bitwarden 무료 암호관리 프로그램 (0) | 2021.04.15 |