Home  >  Article  >  Operation and Maintenance  >  How docker packages images into files

How docker packages images into files

王林
王林Original
2020-03-24 11:55:195410browse

How docker packages images into files

Save the image as a file, the command is as follows:

docker save -o 要保存的文件名  要保存的镜像

Example:

[root@iZbp16cdvzk4rhl0vn1gedZ ~]# ls
aaa.cap  install.sh  mobile-1.0.0-SNAPSHOT.jar  sa_recovery.log
[root@iZbp16cdvzk4rhl0vn1gedZ ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
bb                  v1.0                3b8d26737bcb        10 minutes ago      202MB
centos              latest              9f38484d220f        3 weeks ago         202MB
java                latest              d23bdf5b1b1b        2 years ago         643MB
[root@iZbp16cdvzk4rhl0vn1gedZ ~]# docker save -o cc.tar bb:v1.0
[root@iZbp16cdvzk4rhl0vn1gedZ ~]# ls
aaa.cap  cc.tar  install.sh  mobile-1.0.0-SNAPSHOT.jar  sa_recovery.log

Recommended tutorial: docker tutorial

The above is the detailed content of How docker packages images into files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn