2022年7月20日星期三

docker images save and load , export and import

# docker save image to tar file      
docker save image:version -o imagename.tar 

# docker load image from tar file      
docker load < imagename.tar    #create image:latest

# docker export container to tar file       
docker export sample-container > sample-container.tar

# docker import  from tar file to image   
docker import sample-container.tar > sample-image:latest

没有评论: