Documentation
¶
Overview ¶
Package testimage gives a test that builds a ShellHub Dockerfile the build arguments the Dockerfile declares without defaults: the versions pinned in versions.env at the repository root, the same file the compose wrapper and CI pass to their builds.
Index ¶
Constants ¶
const FileName = "versions.env"
FileName is the file at the repository root that pins every build-time version.
const MirrorEnv = "DOCKERHUB_MIRROR"
MirrorEnv names the environment variable holding the registry prefix Docker Hub images are pulled through, such as "registry.infra.ossystems.io/cache/". Empty pulls from Docker Hub.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
BuildArgs reads versions.env from root and returns its KEY=VALUE lines in the form testcontainers takes as build arguments, with MirrorEnv added from the environment. It returns an error when the file cannot be read or a line is not KEY=VALUE with both sides filled in, so a build never runs with an empty version.
func DockerHub ¶ added in v0.28.0
DockerHub returns image, a Docker Hub reference such as "alpine:3.24.2", behind the prefix Mirror returns, or image itself when MirrorEnv is unset.
func Mirror ¶ added in v0.28.0
func Mirror() string
Mirror returns the registry prefix MirrorEnv holds, empty when the variable is unset.
Types ¶
This section is empty.