Step1. 從Docker的官方網站下載Docker.4.24.2.dmg, Double Click執行安裝。
Step2. 建立docker指令的連結
$ cd /usr/local/bin
$ ln -s docker /Applications/Docker.app/Contents/Resources/bin/docker
$ ln -s “/Applications/Docker.app/Contents//Resources/bin/docker-credential-osxkeychain” “/usr/local/bin/docker-credential-osxkeychain”
$ ln -s “/Applications/Docker.app/Contents//Resources/bin/docker-credential-desktop” “/usr/local/bin/docker-credential-desktop”
$ docker exec -it my_sql_container bash
$ docker logs mysql 2>&1 | grep GENERATED
# mysql -u root -p
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘000000000’;
$ docker exec -it my_sql_container bash
$ docker logs mysql 2>&1 | grep GENERATED
# mysql -u root -p
mysql> ALTER USER ‘root’@’localhost’ IDENTIFIED BY ‘000000000’;