v1

package
v25.0.3+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const DockerOCIImageMediaType = "application/vnd.docker.container.image.v1+json"

Variables

This section is empty.

Functions

This section is empty.

Types

type DockerOCIImage

type DockerOCIImage struct {
	ocispec.Image

	// Shadow ocispec.Image.Config
	Config DockerOCIImageConfig `json:"config,omitempty"`
}

DockerOCIImage is a ocispec.Image extended with Docker specific Config.

type DockerOCIImageConfig

type DockerOCIImageConfig struct {
	ocispec.ImageConfig

	DockerOCIImageConfigExt
}

DockerOCIImageConfig is a ocispec.ImageConfig extended with Docker specific fields.

type DockerOCIImageConfigExt

type DockerOCIImageConfigExt struct {
	Healthcheck *HealthcheckConfig `json:",omitempty"` // Healthcheck describes how to check the container is healthy

	OnBuild []string `json:",omitempty"` // ONBUILD metadata that were defined on the image Dockerfile
	Shell   []string `json:",omitempty"` // Shell for shell-form of RUN, CMD, ENTRYPOINT
}

DockerOCIImageConfigExt contains Docker-specific fields in DockerImageConfig.

type HealthcheckConfig

type HealthcheckConfig struct {
	// Test is the test to perform to check that the container is healthy.
	// An empty slice means to inherit the default.
	// The options are:
	// {} : inherit healthcheck
	// {"NONE"} : disable healthcheck
	// {"CMD", args...} : exec arguments directly
	// {"CMD-SHELL", command} : run command with system's default shell
	Test []string `json:",omitempty"`

	// Zero means to inherit. Durations are expressed as integer nanoseconds.
	Interval      time.Duration `json:",omitempty"` // Interval is the time to wait between checks.
	Timeout       time.Duration `json:",omitempty"` // Timeout is the time to wait before considering the check to have hung.
	StartPeriod   time.Duration `json:",omitempty"` // The start period for the container to initialize before the retries starts to count down.
	StartInterval time.Duration `json:",omitempty"` // The interval to attempt healthchecks at during the start period

	// Retries is the number of consecutive failures needed to consider a container as unhealthy.
	// Zero means inherit.
	Retries int `json:",omitempty"`
}

HealthcheckConfig holds configuration settings for the HEALTHCHECK feature.

Jump to

Keyboard shortcuts

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