dockerutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package dockerutil provides Docker utility functions.

Index

Constants

View Source
const DefaultBridgeNetwork = "bridge"

DefaultBridgeNetwork is the name of the default bridge network in Docker.

Variables

This section is empty.

Functions

func BridgeGateway

func BridgeGateway(cli client.APIClient) (*net.IPNet, error)

BridgeGateway returns the gateway of the default Docker bridge network.

func BridgeHost

func BridgeHost(cli client.APIClient) (string, error)

BridgeHost returns a host that points to the Docker host and is reachable from the containers running in the default bridge.

func Gateways

func Gateways(ctx context.Context, cli client.APIClient, network string) ([]*net.IPNet, error)

Gateways returns the gateways of the specified Docker network.

func NewAPIClient

func NewAPIClient() (client.APIClient, error)

NewAPIClient returns a new Docker API client. This client behaves as close as possible to the Docker CLI. It gets its configuration from the Docker config file and honors the Docker CLI environment variables. It also sets up TLS authentication if TLS is enabled.

Types

This section is empty.

Jump to

Keyboard shortcuts

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