首先删除原有的镜像
[root@docker ~]# docker rmi fuchao
Untagged: fuchao:latest
Deleted: 8be9f7652ab5d402033dda3d0ba661f540a5111371b7ef03241407f8418d2fd3
查看那本地镜像库
[root@docker ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
docker.io/ubuntu latest af88597ec24b 41 hours ago 187.9 MB
docker.io/centos latest 60e65a8e4030 12 days ago 196.6 MB
把本地文件导入到本地镜像库
[root@docker ~]# docker load < fuchao_latest
测试:
[root@docker ~]# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
fuchao latest 8be9f7652ab5 19 minutes ago 202.3 MB
docker.io/ubuntu latest af88597ec24b 41 hours ago 187.9 MB
docker.io/centos latest 60e65a8e4030 12 days ago 196.6 MB