[Study Docker] Section III: compression and image import and export

Relevant information:

[Study Docker] Section: Docker + Alpine + Openssh + Supervisor deploy Linux foundation environment

[Study Docker] Section II: Installation alpine-pkg-glibc, java deployment environment

 

Go on to one, when the image after the establishment of the distribution relates to the problem, the following method can be derived by the mirror, and then introduced to the new platform, the code is as follows:

# 导出镜像
docker save highlevel/alpine-server:glibc -o alpine-server-glibc.tar

# 导入镜像
docker load -i alpine-server-glibc.tar



# 导出镜像并压缩,需要先在主机安装gzip
docker save highlevel/alpine-server:glibc | gzip -o alpine-server-glibc.tar.gz

# 导入镜像
docker load -i alpine-server-glibc.tar.gz

 

Published 28 original articles · won praise 2 · views 10000 +

Guess you like

Origin blog.csdn.net/highlevels/article/details/94637952