知识卡片
默认命令可被任务覆盖
CMD指定镜像默认启动命令,例如开发容器进入shell;运行参数或任务定义可覆盖它。镜像存在不等于某服务已启动,排查应检查实际命令、工作目录和入口执行结果。
这张卡片看不懂?
这张卡片已通过人工审查,不再接受失败反馈。
已有反馈 · 0 条
还没有人提交反馈。
在整书笔记中的位置
- · 依赖管理实践
原书出处 · 1 处
- · 查看原书依据
CMD ["bash"] We specify the base image that will form the base layer of our own image. The python:3.10-slim-bookworm image is 145 MB, as opposed to python:3.10, which is 915 MB. At the end of this chapter, we will describe the benefits of using small images. The WORKDIR instruction sets a default working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions in
参考来源
- 位置:《Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)》第04章《依赖管理实践》(来源项目:a19c7933-4eda-4176-aebd-30fe7e1ad292;源文件:extracted/Effective Machine Learning Teams (David Tan, Ada Leung, David Colls)/_epub-src/OEBPS/ch04.html)
- 结论依据:摘录中关于默认命令可被任务覆盖的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。
- 原始内容:CMD ["bash"] We specify the base image that will form the base layer of our own image. The python:3.10-slim-bookworm image is 145 MB, as opposed to python:3.10, which is 915 MB. At the end of this chapter, we will describe the benefits of using small images. The WORKDIR instruction sets a default working directory for any subsequent RUN, CMD, ENTRYPOINT, COPY, and ADD instructions in