1.列出容器
docker ps
[root@zk01 docker]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e1066fe2db35 mysql:5.7.18 "docker-entrypoint..." 6 seconds ago Up 6 seconds 0.0.0.0:3306->3306/tcp mymysql
2.进入容器
docker exec -it e1066fe2db35 /bin/bash
3.apt-get update
4.apt-get install vim