Back to Oh My Posh

Docker

website/docs/segments/cli/docker.mdx

29.12.02.2 KB
Original Source

What

Display the current Docker context. Will not be active when using the default context.

Sample Configuration

import Config from "@site/src/components/Config.js";

<Config data={{ type: "docker", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#000000", background: "#0B59E7", template: " \uf308 {{ .Context }} ", }} />

Options

NameTypeDefaultDescription
display_modestringcontext<ul><li>files: the segment is only displayed when a file extensions listed is present</li><li>context: displays the segment when a Docker context active</li></ul>
fetch_contextbooleantruealso fetch the current active Docker context when in the files display mode
extensions[]stringcompose.yml, compose.yaml, docker-compose.yml, docker-compose.yaml, Dockerfileallows to override the default list of file extensions to validate

Template (info)

:::note default template

template
\uf308 {{ .Context }}

:::

Properties

NameTypeDescription
.Contextstringthe current active context