window上运行docker
先运行Kitematic (Alpha).exe,再运行Docker Quickstart Terminal.exe
先运行Kitematic (Alpha).exe,再运行Docker Quickstart Terminal.exe
如何在docker和宿主机之间复制文件
从主机复制到容器sudo docker cp host_path containerID:container_path
从容器复制到主机sudo docker cp containerID:container_path host_path
从主机复制到容器sudo docker cp host_path containerID:container_path
从容器复制到主机sudo docker cp containerID:container_path host_path
容器ID的查询:
docker ps -a
docker ps -a
镜像保存
docker save -o D://image.tar ubuntu:16.04
docker save -o D://image.tar ubuntu:16.04
加载镜像
docker load -i images.tar
docker load -i images.tar
使用容器
docker -t -i myhello:latest /bin/bash
docker -t -i myhello:latest /bin/bash
返回容器
docker exec -it 775c7c9ee1e1 /bin/bash
docker exec -it 775c7c9ee1e1 /bin/bash
docker保存容器
docker export containID > filename
docker导入容器
docker import filename [newname]
docker export containID > filename
docker导入容器
docker import filename [newname]