# 重新安装 discourse 时不要忘记运行 docker remove app

**URL:** <https://meta.discourse.org/t/dont-forget-to-run-docker-remove-app-when-reinstalling-discourse/347139>\
**Category:** Product Support\
**Created:** [2025 年1 月 14 日 21:22 UTC](https://meta.discourse.org/t/dont-forget-to-run-docker-remove-app-when-reinstalling-discourse/347139 "2025-01-14T21:22:48Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

作者： ![Godmar\_Back](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/godmar_back/32/206246_2.png) [@Godmar\_Back](https://meta.discourse.org/u/Godmar_Back)\
发布日期： [2025 年1 月 14 日 22:44 UTC](https://meta.discourse.org/t/dont-forget-to-run-docker-remove-app-when-reinstalling-discourse/347139/3 "2025-01-14T22:44:26Z")

</div>

我认为问题出在“容器实例”和“容器镜像”的通常混淆上。

例如，如果您查看 [10. 安装后维护](https://github.com/discourse/discourse/blob/main/docs/INSTALL-cloud.md#10-post-install-maintenance)，它会显示：

```plaintext
用法：launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
命令：
    start： 启动/初始化容器
    stop： 停止正在运行的容器
    restart： 重启容器
    destroy： 停止并移除容器
    enter： 使用 nsenter 进入容器 shell
    logs： 查看容器的 Docker 日志
    bootstrap： 根据模板为配置引导容器
    rebuild： 重建容器（销毁旧的，引导，启动新的）
    cleanup： 移除所有已停止超过 24 小时的容器

```

在此帮助输出中，“容器”一词在大多数情况下指的是容器的实例。除了 bootstrap，它指的是镜像。（`./launcher bootstrap` 使用 `docker commit` 创建一个新镜像，后续的容器实例可以从中启动。）我认为这是出乎意料的（我天真地认为它也会影响当前的 `app` 实例。）

在 `rebuild` 中，“容器”一词同时指容器镜像和实例，因为它涉及一组操作，这些操作会影响容器实例和容器镜像。

而且不清楚它在 `cleanup` 中指的是什么——是只移除实例，还是也移除引导的镜像？

---

_[View the full topic](https://meta.discourse.org/t/dont-forget-to-run-docker-remove-app-when-reinstalling-discourse/347139)._
