4-Docker命令之docker load

小黑要上天 2024-06-17 15:37:01 阅读 88

1.docker load介绍

docker load命令是用来将从tar归档文件载入镜像

docker load命令相对应的命令是docker save

2.docker load用法

docker load [参数]

[root@centos79 ~]# docker load --helpUsage: docker load [OPTIONS]Load an image from a tar archive or STDINAliases: docker image load, docker loadOptions: -i, --input string Read from tar archive file, instead of STDIN -q, --quiet Suppress the load output[root@centos79 ~]#

3.实例

3.1.将归档的镜像文件载入到镜像

基于使用docker save命令归档的tar镜像文件

-->删除docker镜像文件

命令:

docker rmi -f nginx:latest

[root@centos79 ~]# docker images | grep nginxnginx latest 605c77e624dd 23 months ago 141MB[root@centos79 ~]# docker rmi -f nginx:latestUntagged: nginx:latest[root@centos79 ~]# docker images | grep nginx[root@centos79 ~]#

-->将刚归档的镜像文件载入到镜像

命令ÿ



声明

本文内容仅代表作者观点,或转载于其他网站,本站不以此文作为商业用途
如有涉及侵权,请联系本站进行删除
转载本站原创文章,请注明来源及作者。