启动,停止,重启
docker start 容器名/容器ID docker stop 容器名/容器ID docker restart 容器名/容器ID
进入容器
docker exec -it 容器名/容器ID bash
docker exec -it 容器名/容器ID sh
docker exec -it --user root 容器名/容器ID bash
宿主与容器之间复制
docker cp demo.war mytomcat:/usr/local/tomcat/webapps
docker cp mytomcat:/usr/local/tomcat/webapps/demo.war /home
查看日志
docker logs -f 容器名/容器ID
镜像打包
docker save -o 文件名 镜像 docker load --input 文件名 docker load < 文件名