dockerhost

package
v1.2.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package dockerhost resolves which container engine kubesoloctl talks to, the way the docker CLI does: DOCKER_HOST, otherwise the active Docker context.

Colima, Rancher Desktop, Podman and Docker Desktop each register a context pointing at their own socket, and often do not provide /var/run/docker.sock at all; kind follows the context through the docker CLI, and kubesoloctl, which talks to the engine directly, has to read it itself.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Host

func Host() (string, error)

Host returns the engine endpoint to use: DOCKER_HOST when it is set, else the endpoint of the context named by DOCKER_CONTEXT or by currentContext in the docker CLI's config.json. It returns "" when neither names one other than "default", which means the client's own default, /var/run/docker.sock.

func NewClient

func NewClient() (*client.Client, error)

NewClient returns a client of the engine Host resolves. For a context, the TLS material the docker CLI stores with it is used too, and the DOCKER_* environment, which describes DOCKER_HOST, is not.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL