docker入门3:基础操作(2)
-- 容器删除
docker rm CONTAIN_ID|CONTAIN_NAME
-- 镜像删除
docker rmi IMAGE_ID|IMAGE_NAME
-- 进入容器
docker exec -it CONTAIN_ID|CONTAIN_NAME TTY
示例:docker exec -it node_server /bin/bash
-- 容器内容考入考出
考入:sudo docker cp host_path containerID:container_path
考出:sudo docker cp containerID:container_path host_path
-- docker 如何查看已存在的容器挂载信息
docker inspect container_name | grep Mounts -A 20
-- 容器日志输出
docker logs -f CONTAIN_ID|CONTAIN_NAME
示例:docker logs -f nginx-local