# docker **Repository Path**: thinkyoung/docker ## Basic Information - **Project Name**: docker - **Description**: docker - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-09-21 - **Last Updated**: 2024-10-11 ## Categories & Tags **Categories**: Uncategorized **Tags**: Docker ## README # docker 项目地址:git clone https://gitee.com/thinkyoung/docker.git 我目前用docker国内镜像源: (1)在/etc/docker目录中添加daemon.json文件,内容如下: 修改/etc/docker/daemon.json,增加或者修改以下配置: { "registry-mirrors": [ "https://dockerproxy.com", "https://hub-mirror.c.163.com", "https://mirror.baidubce.com", "https://ccr.ccs.tencentyun.com", "https://registry.docker-cn.com", "https://docker.mirrors.ustc.edu.cn", "https://pee6w651.mirror.aliyuncs.com" ] } (2)重启docker服务: sudo service docker restart (3)执行:sudo docker info,查看是否配置成功: =================================== 镜像导入导出 1 通过docker image查看本机上的所有镜像 docker images 2 导出镜像 找到要上传的镜像的id,使用docker save命令将镜像保存为一个文件 docker save 镜像id > image.tar 上面命令执行之后,我们便可以通过ls命令在当前目录下发现image.tar 3 导入镜像 docker save 可以将多个image打包成一个文件 docker save -o image.tar 镜像1 镜像2 4 通过docker load载入镜像 docker load < image.tar