minitrino.core.docker.socket module#
Resolve the Docker socket to use.
For internal and external use (e.g. CLI and tests).
- minitrino.core.docker.socket.get_docker_context_name(ctx: MinitrinoContext | None = None, env=None) str[source][source]#
Return the name of the active Docker context.
- Parameters:
ctx (MinitrinoContext, optional) – The MinitrinoContext object to use for executing commands. Defaults to None.
env (dict, optional) – Dictionary of environment variables to use when resolving the Docker context. Defaults to None.
- Returns:
The name of the active Docker context (e.g., “orbstack”, “desktop-linux”, “default”). Returns empty string if unable to determine.
- Return type:
str
- minitrino.core.docker.socket.resolve_docker_socket(ctx: MinitrinoContext | None = None, env=None) str[source][source]#
Return the Docker socket to use, preferring DOCKER_HOST if set.
- Parameters:
ctx (MinitrinoContext, optional) – The MinitrinoContext object to use for executing commands. Defaults to None.
env (dict, optional) – Dictionary of environment variables to use when resolving the Docker socket. Defaults to None.
- Returns:
The Docker socket to use.
- Return type:
str
- Raises:
MinitrinoError – If the Docker socket cannot be determined.