调用框
目录
我们支持这些广泛的调用框类别
- 版本调用框
- 注释(不需要 HTML 属性)
- 提示,使用
{ .tip }
类 - 重要,使用
{ .important }
类 - 警告,使用
{ .warning }
类 - 实验性,使用
{ .experimental }
类 - 受限,使用
{ .restricted }
类
示例
在 Buildx 版本 0.10.4 中引入
注意
注意
get_hit_count
函数的编写方式。这个基本的重试循环允许我们在 redis 服务不可用时多次尝试我们的请求。这在应用程序启动时非常有用,因为应用程序正在上线,但也使我们的应用程序在 Redis 服务在应用程序生命周期中的任何时间需要重新启动时更具弹性。在集群中,这也有助于处理节点之间短暂的连接断开。
提示
对于更小的基础镜像,请使用
alpine
。
重要
将访问令牌视为您的密码,并将其保密。安全地存储您的令牌(例如,在凭据管理器中)。
警告
删除卷
默认情况下,您的 compose 文件中的命名卷在运行
docker compose down
时不会被删除。如果您想删除卷,则需要添加--volumes
标志。Docker 仪表板在您删除应用程序堆栈时不会删除卷。
对于以下两个调用框,请参阅 Docker 发布生命周期,了解有关何时使用它们的更多信息。
测试版功能
构建视图目前处于测试阶段。此功能可能会在将来的版本中更改或删除。
受限
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`.
{ .tip }
> **Important**
>
> Treat access tokens like your password and keep them secret. Store your
> tokens securely (for example, in a credential manager).
{ .important }
> **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 Dashboard does _not_ remove volumes when you delete the app stack.
{ .warning }
> **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 }