再看一张图,docker的整体流程:
通过Dockerfile编写源代码,通过build,成为一个镜像,然后如果想发布,就push到远程仓库,如果运行,通过run命令,就变成一个容器,如果修改想提交,通过commit,就可以变为一个新的镜像~
下载的流程,从docker仓库,pull下来,拉倒本地之后,可以run运行起来,修改后提交,就变成一个新的镜像,如果想打包成为一个压缩包,可以发给别人,这个是用save和load命令
[root@xiaoxiao ~]# docker save --help
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
[root@xiaoxiao ~]# docker load --help
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
这个图更全:
这里的命令我们基本上都学习了~
好了,今天先到这里~