package testcontainersdocker

import "github.com/testcontainers/testcontainers-go/internal/testcontainersdocker"

Index

Constants

const (
	LabelBase      = "org.testcontainers"
	LabelLang      = LabelBase + ".lang"
	LabelReaper    = LabelBase + ".reaper"
	LabelSessionID = LabelBase + ".sessionId"
	LabelVersion   = LabelBase + ".version"
)

Variables

var DockerHostContextKey = dockerHostContext("docker_host")

Functions

func DefaultGatewayIP

func DefaultGatewayIP() (string, error)

deprecated see https://github.com/testcontainers/testcontainers-java/blob/main/core/src/main/java/org/testcontainers/dockerclient/DockerClientConfigUtils.java#L46

func ExtractDockerHost

func ExtractDockerHost(ctx context.Context) (dockerHostPath string)

Extracts the docker host from the context, or returns the default value

func InAContainer

func InAContainer() bool

InAContainer returns true if the code is running inside a container See https://github.com/docker/docker/blob/a9fa38b1edf30b23cae3eade0be48b3d4b1de14b/daemon/initlayer/setup_unix.go#L25

Source Files

docker_host.go labels.go

Version
v0.18.0
Published
Feb 16, 2023
Platform
darwin/amd64
Imports
6 packages
Last checked
7 minutes ago

Tools for package owners.