docker修改镜像名称以及保存镜像文件

时间:2021-08-05 21:16:03

1、修改镜像名

[[email protected] ~]# docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
absolutapps/oracle-12c-ee   latest              ad9bdfc002e7        3 years ago         6.12GB
[[email protected] ~]# docker tag ad9bdfc002e7 oracle-12c-ee:latest
[[email protected] ~]# docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
absolutapps/oracle-12c-ee   latest              ad9bdfc002e7        3 years ago         6.12GB
oracle-12c-ee               latest              ad9bdfc002e7        3 years ago         6.12GB

2、保存镜像,便于镜像转移

docker save ad9bdfc002e7 -o /home/docker_oracle-12c-ee.tar