1、列出所有人容器id
[root@2 ]# docker ps -l
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
4cbaaad7fae8 rabbitmq:management "docker-entrypoint.s…" 3 hours ago Up 3 hours 4369/tcp, 5671/tcp, 0.0.0.0:5672->5672/tcp, 15671/tcp, 15691-15692/tcp, 25672/tcp, 0.0.0.0:15672->15672/tcp rabbitmq
2、进入指定容器
[root@2 ]# docker exec -it 4cbaaad7fae8 sh
#