Skip to content

fix(dockerfile): Avoid autoremove removing runtime deps#68

Merged
creeper5820 merged 1 commit intomainfrom
fix/dockerfile-autoremove
May 3, 2026
Merged

fix(dockerfile): Avoid autoremove removing runtime deps#68
creeper5820 merged 1 commit intomainfrom
fix/dockerfile-autoremove

Conversation

@creeper5820
Copy link
Copy Markdown
Contributor

修复 Dockerfile 中多处安装步骤在完成后执行 apt-get autoremove -y 的问题。该清理行为会在镜像构建过程中误删由其他包间接拉起的运行时依赖,导致后续环境缺少实际需要的库。此次修改将常规安装层中的 autoremove 调整为仅执行缓存清理,保留显式临时构建依赖的定向卸载逻辑,从而避免运行时依赖被错误移除

@github-project-automation github-project-automation Bot moved this to Todo in RMCS May 3, 2026
@creeper5820 creeper5820 requested a review from qzhhhi May 3, 2026 18:37
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2d1d61ff-7ed7-4263-a356-724726af1a64

📥 Commits

Reviewing files that changed from the base of the PR and between de6b050 and f62cb63.

📒 Files selected for processing (1)
  • Dockerfile

概述

Dockerfile 中的多个 RUN 步骤从 apt-get autoremove -y && apt-get clean 更新为 apt-get clean,涵盖基础镜像、OpenVINO、rosdep、Node.js、交叉工具链和运行时工具的清理步骤。应用逻辑和容器入口点未变更。

变更内容

Docker 清理步骤优化

层 / 文件 摘要
基础镜像包清理
Dockerfile(第 35-45 行)
移除 rmcs-base 阶段中初始工具包安装后的 apt-get autoremove -y,保留 apt-get clean
OpenVINO 安装清理
Dockerfile(第 54-58 行)
OpenVINO 2025.2.0 apt 安装后的清理序列从 apt-get autoremove -y && apt-get clean 改为仅 apt-get clean
Rosdep 安装清理
Dockerfile(第 74-79 行)
rosdep install 步骤的清理序列移除 apt-get autoremove -y,保留 apt-get clean
Node.js 安装清理
Dockerfile(第 109-120 行)
rmcs-develop 阶段 Node.js 24 LTS 安装的清理链从 apt-get autoremove -y && apt-get clean && ... 改为 apt-get clean && ...
交叉工具链清理
Dockerfile(第 222-227 行)
rmcs-develop-full 阶段交叉编译包安装后的清理从 apt-get autoremove -y && apt-get clean 改为 apt-get clean
运行时工具清理
Dockerfile(第 265-270 行)
rmcs-runtime 阶段运行时工具安装的 apt 清理从 apt-get autoremove -y && apt-get clean 改为 apt-get clean

代码审查工作量评估

🎯 2 (简单) | ⏱️ ~8 分钟

诗歌

📋 兔子的贺诗 🐰

一个小改变贯穿始终,
apt 清理更清爽,去掉冗余行,
六处容器镜像齐整装,
简约之美在 Dockerfile 中绽放 ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR标题清晰准确地总结了主要变更:从Dockerfile中移除autoremove以避免删除运行时依赖项,与摘要和目标完全对应。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dockerfile-autoremove

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

@creeper5820 creeper5820 merged commit 4ac2ba6 into main May 3, 2026
8 checks passed
@creeper5820 creeper5820 deleted the fix/dockerfile-autoremove branch May 3, 2026 23:04
@github-project-automation github-project-automation Bot moved this from Todo to Done in RMCS May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant