How docker packages images into files

王林
Release: 2020-03-24 11:55:19
Original
5413 people have browsed it

How docker packages images into files

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

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

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
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template