docker

package
v0.0.0-...-ccc3f85 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ContainerSourceDir    = "git"
	ContainerArtifactsDir = "result"
	DefaultQuillImage     = "registry.werf.io/trdl/quill:028f446b1b76be918781b24e7f77a6b4c0c74972"
)

Variables

View Source
var ErrImageNameWithoutRequiredDigest = errors.New("the image name must contain an digest \"REPO[:TAG]@DIGEST\" (e.g. \"ubuntu:18.04@sha256:538529c9d229fb55f50e6746b119e899775205d62c0fc1b7e679b30d02ecb6e8\")")

Functions

func BuildReleaseArtifacts

func BuildReleaseArtifacts(ctx context.Context, opts BuildReleaseArtifactsOpts, logger hclog.Logger) error

func GenerateAndAddDockerfileToTar

func GenerateAndAddDockerfileToTar(tw *tar.Writer, dockerfileTarPath, fromImage string, runCommands []string, dockerfileOpts DockerfileOpts) error

func GetMacSigningCommandMounts

func GetMacSigningCommandMounts(creds *mac_signing.Credentials) []string

func GetQuillImage

func GetQuillImage() string

func GetSecretsCommandMounts

func GetSecretsCommandMounts(secrets []secrets.Secret) []string

func GetSecretsRunMounts

func GetSecretsRunMounts(secrets []secrets.Secret) string

func RemoveImagesByLabels

func RemoveImagesByLabels(ctx context.Context, cli *client.Client, labels map[string]string) error

func SetMacSigningTempEnvVars

func SetMacSigningTempEnvVars(creds *mac_signing.Credentials) error

func SetTempEnvVars

func SetTempEnvVars(secrets []secrets.Secret) error

func ValidateImageNameWithDigest

func ValidateImageNameWithDigest(imageName string) error

Types

type BuildReleaseArtifactsOpts

type BuildReleaseArtifactsOpts struct {
	FromImage   string
	RunCommands []string
	GitRepo     *git.Repository
	TarWriter   *nio.PipeWriter
	Storage     logical.Storage
}

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder(ctx context.Context, opts *NewBuilderOpts) (*Builder, error)

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, contextReader *nio.PipeReader, tarWriter *nio.PipeWriter) error

func (*Builder) Remove

func (b *Builder) Remove(ctx context.Context) error

type DockerfileOpts

type DockerfileOpts struct {
	EnvVars               map[string]string
	Labels                map[string]string
	Secrets               []secrets.Secret
	MacSigningCredentials *mac_signing.Credentials
}

type Logger

type Logger interface {
	Info(msg string, args ...interface{})
	Error(msg string, args ...interface{})
}

type NewBuilderOpts

type NewBuilderOpts struct {
	BuildId               string
	ContextPath           string
	Secrets               []secrets.Secret
	MacSigningCredentials *mac_signing.Credentials
	Logger                Logger
}

Jump to

Keyboard shortcuts

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