昆 明 哪 有 外 围 - 昆 明 哪 里 有 外 围 模 特

昆 明 哪 有 外 围 - 昆 明 哪 里 有 外 围 模 特 -薇芯【97672798】【97672798】【信誉经纪人实力品牌】【诚信合作,非诚勿扰!】可直接添加 !上述的Dockerfile的构建镜像的方式是自动化进行的,那么手动构建的方式就是剩下的两种了。

基于已有的镜像构建主要是通过docker commit 命令来构建新的镜像,其实质就是将一个容器里面运行的程序以及该程序的运行环境打包起来生成新的镜像。

docker commit的语法规则及可选项介绍

Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]

昆 明 哪 有 外 围 - 昆 明 哪 里 有 外 围 模 特 -薇芯【97672798】【97672798】【信誉经纪人实力品牌】【诚信合作,非诚勿扰!】可直接添加 !Create a new image from a container's changes

Options:
-a, --author string Author (e.g., "John Hannibal Smith <[email protected]>")#作者信息
-c, --change list Apply Dockerfile instruction to the created image
-m, --message string Commit message #说明信息
-p, --pause Pause container during commit (default true) #生成过程中停止容器的运行
案例:基于原有镜像构建新的镜像(看实质原理)

1.创建一个容器

[root@localhost ~]# docker create -it nginx /bin/bash

猜你喜欢

转载自www.cnblogs.com/lim998/p/12791556.html
今日推荐