进入docker容器


 description

进入mysql容器

 command

docker exec -it mysql /bin/bash

 parameter

exec : 在运行容器中运行命令
-i, --interactive : 	即使没有连接,也要保持标准输入保持打开状态
-t, --tty : 分配一个伪tty,一般与 -i 连用

 result

root@fbaf9d....:/# 

I hope to help every developer quickly find the commands they need. Of course, you can also add your own commonly used commands for easy searching.