標註

我們支援以下幾類標註

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

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

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

屬性描述可能的值
訂閱指明使用該功能所需的訂閱所有、個人、專業版、團隊版、商業版
可用性指明該功能處於哪個產品開發階段實驗性、測試版、搶先體驗、正式釋出、已棄用
要求指明使用該功能所需的最低版本沒有特定值,使用字串描述版本並連結到相關的發行說明
適用於指明該功能是否適用於 IT 管理員管理員

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

示例

訂閱: 商業版
要求: 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.
頁面選項