標註

我們支援以下幾大類標註

  • 警示 (備註、提示、重要、警告、注意)
  • 版本標註
  • 實驗性,使用 {{% experimental %}} shortcode
  • 限制性,使用 {{% restricted %}} shortcode

實驗性和限制性 shortcode 將標題作為參數。標題是選用的,預設分別為「實驗性」或「限制性」,並顯示在標註中。

範例

Buildx 版本 0.16.0 中引入

備註

請注意 `get_hit_count` 函式的撰寫方式。這個基本的重試迴圈允許我們在 redis 服務不可用時多次嘗試請求。這在應用程式啟動上線時很有用,但也使我們的應用程式在應用程式生命週期中任何時候需要重新啟動 Redis 服務時更具彈性。在叢集中,這也有助於處理節點之間的瞬間連線中斷。

提示

若要使用較小的基礎映像檔,請使用 `alpine`。

重要

將存取權杖視為您的密碼並保密。請將您的權杖安全地儲存 (例如,在憑證管理員中)。

警告

移除磁碟區

預設情況下,執行 `docker compose down` 時,Compose 檔案中的具名磁碟區「不會」被移除。如果您想要移除磁碟區,則需要新增 `--volumes` 旗標。

當您刪除應用程式堆疊時,Docker Desktop 儀表板不會移除磁碟區。

注意

前方高能。

關於以下兩個標註,請參閱 Docker 發行生命週期以瞭解更多關於何時使用它們的資訊。

Beta 功能

建置檢視目前處於 Beta 階段。此功能可能會在未來的版本中變更或移除。

限制使用

Docker Scout 是一款早期試用產品。

格式

{{< introduced buildx 0.10.4 "../../release-notes.md#0104" >}}
> [!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.
{{% experimental title="Beta feature" %}}
The Builds view is currently in Beta. This feature may change or be removed from future releases.
{{% /experimental %}}

{{% restricted %}}
Docker Scout is an [early access](/release-lifecycle/#early-access-ea) product.
{{% /restricted %}}