今天在AWS雲主機上部署Grafana,發現無法使用私有倉庫,於是,嘗試了下docker save和docker load。着實很好用,簡單記錄下:
docker save用法:
Usage: docker save [OPTIONS] IMAGE [IMAGE...] Save one or more images to a tar archive (streamed to STDOUT by default) Options: -o, --output string Write to a file, instead of STDOUT
docker save -o your_path/image.tar image_name:tag
docker load用法:
docker load -i image.tar
Usage: docker load [OPTIONS] Load an image from a tar archive or STDIN Options: -i, --input string Read from tar archive file, instead of STDIN -q, --quiet Suppress the load output
scp攜帶證書傳輸:
scp -i "your_certificatefile" local_folder remote_username@host:remote_folder