Cross-server docker image package upload and download operation (not warehouse but intranet server!!!)

statement! Business needs, cross-server image upload and download operations

Premise and background, most of the company's servers cannot access the external network, and the docker image cannot be pulled from the remote warehouse, which can be obtained in the following ways

step one:

Pull the required image from a server that can access the external network and save it in  .tar format

docker save 镜像名:版本号 > /root/镜像名.tar
注意:镜像名:版本号 如果不写版本号,则会把所有相同的镜像名进行打包
    /root/镜像名.tar 指定保存位置

Step two:

SCP commands are uploaded to the specified server

scp 镜像名.tar 用户名@IP:保存路径
例子:scp mysql.tar [email protected]:/home/test/

Step three:

Install the packaged image on the server

docker load -i 镜像名.tar

 

Guess you like

Origin blog.csdn.net/weixin_43124425/article/details/108106497