標註

我們支援以下主要類別的標註

  • 提醒:注意、提示、重要、警告、小心

我們還支援摘要欄,用於表示功能所需的訂閱、版本或管理員角色。要新增摘要欄,請執行以下操作:

將功能名稱新增到 /data/summary.yaml 檔案中。使用以下屬性

屬性描述可能的值
訂閱註明使用該功能所需的訂閱全部、個人、專業、團隊、商業
可用性註明該功能所處的產品開發階段實驗性、Beta、早期訪問、GA、已停用
要求註明該功能所需的最低版本無特定值,使用字串描述版本並連結到相關發行說明
適用於註明該功能是否適用於 IT 管理員管理員

然後,在要新增摘要欄的頁面上新增 `summary-bar` 簡碼。請注意,功能名稱區分大小寫。摘要欄中顯示的圖示將自動渲染。

示例

訂閱: 商業版
要求: Docker Desktop 4.36 及更高版本
適用於: 管理員
注意

請注意 `get_hit_count` 函式的編寫方式。如果 redis 服務不可用,這種基本的重試迴圈允許我們多次嘗試請求。這在應用程式啟動時以及在應用程式生命週期中 Redis 服務需要重啟時都很有用。在叢集中,這也有助於處理節點之間瞬間的連線中斷。

提示

對於較小的基礎映象,請使用 `alpine`。

重要

像對待密碼一樣對待訪問令牌,並將其保密。安全地儲存您的令牌(例如,在憑證管理器中)。

警告

移除卷

預設情況下,在執行 `docker compose down` 時,compose 檔案中的命名卷不會被移除。如果您想移除這些卷,需要新增 `--volumes` 標誌。

當您刪除應用程式堆疊時,Docker Desktop Dashboard 不會移除卷。

小心

此處有龍出沒。

對於以下兩種標註,請參閱 Docker 釋出生命週期,瞭解何時使用它們。

格式化

{{< summary-bar feature_name="PKG installer" >}}
> [!NOTE]
>
> Note the way the `get_hit_count` function is written. This basic retry
> loop lets us attempt our request multiple times if the redis service is
> not available. This is useful at startup while the application comes
> online, but also makes our application more resilient if the Redis
> service needs to be restarted anytime during the app's lifetime. In a
> cluster, this also helps handling momentary connection drops between
> nodes.

> [!TIP]
>
> For a smaller base image, use `alpine`.

> [!IMPORTANT]
>
> Treat access tokens like your password and keep them secret. Store your
> tokens securely (for example, in a credential manager).

> [!WARNING]
>
> Removing Volumes
>
> By default, named volumes in your compose file are NOT removed when running
> `docker compose down`. If you want to remove the volumes, you will need to add
> the `--volumes` flag.
>
> The Docker Desktop Dashboard does not remove volumes when you delete the app stack.

> [!CAUTION]
>
> Here be dragons.