docker

package
v0.0.0-...-4092e8f Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoDocker = errors.New("docker API not available")

Functions

func NewClient

func NewClient(defaultHost string) (dockerClient client.CommonAPIClient, dockerHostInRemote string, err error)

NewClient creates a new docker client. reads the DOCKER_HOST env-var but it may or may not return it as dockerHost.

  • For local connection (unix socket and windows named pipe) it returns the DOCKER_HOST directly.
  • For ssh connections it reads the DOCKER_HOST from the ssh remote.
  • For TCP connections it returns "" so it defaults in the remote (note that one should not be use client.DefaultDockerHost in this situation). This is needed beaus of TCP+tls connections.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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