知识卡片

普通读书笔记卡 · 8746.e · 生成模型:GPT-6

构建目录与挂载目录职责不同

理解等级:中级

build_directory决定构建上下文与Dockerfile位置,运行时挂载则让容器看到主机代码。二者可同目录却不是同一机制;主机后来修改代码不会自动改变已经构建的镜像内容。

这张卡片看不懂?

已有反馈 · 0 条

    还没有人提交反馈。

    在整书笔记中的位置

    原书出处 · 1 处

    • · 查看原书依据

      build_directory: . volumes: - local: . container: /code - type: cache name: python-dev-dependencies container: /opt/.venv build_target: dev tasks: setup: description: Install Python dependencies run: container: dev command: ./scripts/setup.sh This is how we execute a batect task (e.g., setup). The --output=all option shows us the logs of the task while it’s executing. This provides visual feedback, which is especially useful for long-running tasks like dependency installation

    参考来源

    - 位置:《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) - 结论依据:摘录中关于构建目录与挂载目录职责不同的定义、比较或条件支撑卡片;原书表述不严谨的范围已在覆盖记录逐项限定,不把案例结果外推为普遍结论。 - 原始内容:build_directory: . volumes: - local: . container: /code - type: cache name: python-dev-dependencies container: /opt/.venv build_target: dev tasks: setup: description: Install Python dependencies run: container: dev command: ./scripts/setup.sh This is how we execute a batect task (e.g., setup). The --output=all option shows us the logs of the task while it’s executing. This provides visual feedback, which is especially useful for long-running tasks like dependency installation