Docker
非官方测试版翻译
本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →
功能
显示当前的 Docker 上下文。使用默认上下文时此功能不会激活。
示例配置
- json
- yaml
- toml
{
"type": "docker",
"style": "powerline",
"powerline_symbol": "",
"foreground": "#000000",
"background": "#0B59E7",
"template": " {{ .Context }} "
}
type: docker
style: powerline
powerline_symbol:
foreground: "#000000"
background: "#0B59E7"
template: " {{ .Context }} "
type = "docker"
style = "powerline"
powerline_symbol = ""
foreground = "#000000"
background = "#0B59E7"
template = " {{ .Context }} "
选项
| Name | Type | Default | Description |
|---|---|---|---|
display_mode | string | context |
|
fetch_context | boolean | true | also fetch the current active Docker context when in the files display mode |
extensions | []string | compose.yml, compose.yaml, docker-compose.yml, docker-compose.yaml, Dockerfile | allows to override the default list of file extensions to validate |
模板 (信息)
默认模板
\uf308 {{ .Context }}
属性
| Name | Type | Description |
|---|---|---|
.Context | string | the current active context |