今天在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 save和load将本地镜像上传AWS-LMLPHP

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

docker save和load将本地镜像上传AWS-LMLPHP

scp携带证书传输:

scp -i "your_certificatefile" local_folder remote_username@host:remote_folder
05-26 13:20