container

package
v0.1.2-0...-3e0559f Latest Latest
Warning

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

Go to latest
Published: May 12, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Podman                         = "podman"
	Docker                         = "docker"
	MinimumDockerServerVersion     = "20.10.0"
	RecommendedDockerServerVersion = "23.0.0"
	MinimumPodmanServerVersion     = "4.0.0"
	RecommendedPodmanServerVersion = "4.4.0"
	PodmanHost                     = "host.containers.internal"
	DockerHost                     = "host.docker.internal"
)

Variables

View Source
var (
	ErrCannotConnectToServer          = errors.New("cannot connect to server")
	ErrServerIsOutdated               = errors.New("server is outdated")
	ErrServerVersionIsNotSupported    = errors.New("serverversion is not supported")
	ErrServerUnknown                  = errors.New("server is unknown")
	ErrServerVersionIsNotValid        = errors.New("server version is not valid")
	ErrCannotParseServerVersion       = errors.New("cannot parse server version")
	ErrCannotParseVersionConstraint   = errors.New("cannot parse version constraint")
	ErrCannotGetServerInformation     = errors.New("cannot get server information")
	ErrCannotGetServerVersion         = errors.New("cannot get server version")
	ErrCannotSatisfyVersionConstraint = errors.New("cannot satisfy version constraint")
)

Functions

func GetContainerRuntime

func GetContainerRuntime(ctx context.Context, cli DockerInfoInterface) (string, error)

func GetInternalHostDomain

func GetInternalHostDomain(ctx context.Context, cli DockerInfoInterface) (string, error)

func SatisfyVersion

func SatisfyVersion(minimumVer, preferredVer, actualVer string) error

func VersionCheck

func VersionCheck(ctx context.Context, cli DockerInfoInterface) error

Types

type DockerInfoInterface

type DockerInfoInterface interface {
	Info(context.Context) (types.Info, error)
	ServerVersion(context.Context) (types.Version, error)
}

Jump to

Keyboard shortcuts

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