知识卡片
镜像与容器生命周期不同
镜像是创建运行环境的静态制品,容器是基于镜像启动的运行实例。同一镜像可启动多个实例;Dockerfile描述构建步骤,CMD指定默认启动命令。构建、运行、查看、停止和删除处理不同对象;标签latest只是可移动的默认名称,不保证最新或可重现。
原稿典型操作:docker build -t kvs .构建镜像,docker run kvs启动实例;这里未执行命令。
这张卡片看不懂?
这张卡片的反馈已满 10 条,暂时无法继续提交。
已有反馈 · 0 / 10 条
还没有人提交反馈。
在整书笔记中的位置
原书出处 · 1 处
- Building a Cloud Native Service · 查看原书依据
A container image is essentially an executable binary that contains your application runtime and its dependencies. When an image is run the resulting process is the container. An image can be run many times to create multiple (essentially) identical containers. Over the next few pages we’ll create a simple Dockerfile and build and execute an
参考来源
- 位置:《Cloud Native Go》第05章《Building a Cloud Native Service》(来源项目book-sources;源文件:extracted/Cloud Native Go (Matthew A. Titmus)/_epub-src/OEBPS/ch05.xhtml)
- 结论依据:镜像是创建运行环境的静态制品,容器是基于镜像启动的运行实例。原文相应定义、示例或限制为此结论提供依据;补充纠错与版本边界在正文就近标明。
- 原始内容:A container image is essentially an executable binary that contains your application runtime and its dependencies. When an image is run the resulting process is the container. An image can be run many times to create multiple (essentially) identical containers. Over the next few pages we’ll create a simple Dockerfile and build and execute an