serviceparser

package
v2.0.0-beta.5 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ComposeVerify                            = "x-nerdctl-verify"
	ComposeCosignPublicKey                   = "x-nerdctl-cosign-public-key"
	ComposeSign                              = "x-nerdctl-sign"
	ComposeCosignPrivateKey                  = "x-nerdctl-cosign-private-key"
	ComposeCosignCertificateIdentity         = "x-nerdctl-cosign-certificate-identity"
	ComposeCosignCertificateIdentityRegexp   = "x-nerdctl-cosign-certificate-identity-regexp"
	ComposeCosignCertificateOidcIssuer       = "x-nerdctl-cosign-certificate-oidc-issuer"
	ComposeCosignCertificateOidcIssuerRegexp = "x-nerdctl-cosign-certificate-oidc-issuer-regexp"
)

ComposeExtensionKey defines fields used to implement extension features.

View Source
const Separator = "-"

Separator is used for naming components (e.g., service image or container) https://github.com/docker/compose/blob/8c39b5b7fd4210a69d07885835f7ff826aaa1cd8/pkg/api/api.go#L483

Variables

This section is empty.

Functions

func DefaultContainerName

func DefaultContainerName(projectName, serviceName, suffix string) string

DefaultContainerName returns the service container name following compose naming logic.

func DefaultImageName

func DefaultImageName(projectName string, serviceName string) string

DefaultImageName returns the image name following compose naming logic.

Types

type Build

type Build struct {
	Force     bool     // force build even if already present
	BuildArgs []string // {"-t", "example.com/foo", "--target", "foo", "/path/to/ctx"}

}

type Container

type Container struct {
	Name    string   // e.g., "compose-wordpress_wordpress_1"
	RunArgs []string // {"--pull=never", ...}
	Mkdir   []string // For Bind.CreateHostPath
}

type Service

type Service struct {
	Image      string
	PullMode   string
	Containers []Container // length = replicas
	Build      *Build
	Unparsed   *types.ServiceConfig
}

func Parse

func Parse(project *types.Project, svc types.ServiceConfig) (*Service, error)

Jump to

Keyboard shortcuts

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