Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BuildContextDir = fmt.Sprintf("%s/buildcontext/", KanikoDir)
BuildContextDir is the directory a build context will be unpacked into, for example, a tarball from a GCS bucket will be unpacked here
var DockerConfigDir = fmt.Sprintf("%s/.docker/", KanikoDir)
DockerConfigDir is a where registry credentials are stored
var DockerfilePath = fmt.Sprintf("%s/Dockerfile", KanikoDir)
DockerfilePath is the path the Dockerfile is copied to
var ErrInvalidGitFlag = errors.New("invalid git flag, must be in the key=value format")
var KanikoCacheDir = fmt.Sprintf("%s/caches/", KanikoDir)
KanikoCacheDir is where we will store cache mount directories, ie. RUN --mount=type=cache,target=/var/lib/apt/lists/ Contents are stored as-is.
var KanikoDir = func() string { if kd, ok := os.LookupEnv("KANIKO_DIR"); ok { return kd } return constants.DefaultKanikoPath }()
KanikoDir is the path to the Kaniko directory
var KanikoInterStageDepsDir = func() string { if EnvBoolDefault("FF_KANIKO_NEW_CACHE_LAYOUT", true) { return fmt.Sprintf("%s/deps/", KanikoDir) } return KanikoDir }()
KanikoInsterStageDir is where we will store inter-stage dependencies Contents are stored as-is.
var KanikoIntermediateStagesDir = fmt.Sprintf("%s/stages/", KanikoDir)
KanikoIntermediateStagesDir is where we will store intermediate stages as tarballs in case they are needed later on
var KanikoLayersDir = func() string { if EnvBoolDefault("FF_KANIKO_NEW_CACHE_LAYOUT", true) { return fmt.Sprintf("%s/layers/", KanikoDir) } return KanikoDir }()
KanikoLayersDir is where we will store layers as tarballs
var KanikoSecretsDir = fmt.Sprintf("%s/secrets/", KanikoDir)
KanikoSecretsDir is a where user defined secrets are stored
var KanikoSwapDir = fmt.Sprintf("%s/swap/", KanikoDir)
KanikoSwapDir is a temporary directory used to swap out cache and target directories
var MountInfoPath string
var RootDir string
Functions ¶
func EnvBoolDefault ¶ added in v1.26.0
Types ¶
type CacheOptions ¶
CacheOptions are base image cache options that are set by command line arguments
type Compression ¶
type Compression string
Compression is an enumeration of the supported compression algorithms
const ( GZip Compression = "gzip" ZStd Compression = "zstd" )
The collection of known MediaType values.
func (*Compression) Set ¶
func (c *Compression) Set(v string) error
func (*Compression) String ¶
func (c *Compression) String() string
func (*Compression) Type ¶
func (c *Compression) Type() string
type KanikoGitOptions ¶
type KanikoGitOptions struct {
Branch string
SingleBranch bool
Depth int
RecurseSubmodules bool
InsecureSkipTLS bool
}
func (*KanikoGitOptions) Set ¶
func (k *KanikoGitOptions) Set(s string) error
func (*KanikoGitOptions) String ¶
func (k *KanikoGitOptions) String() string
func (*KanikoGitOptions) Type ¶
func (k *KanikoGitOptions) Type() string
type KanikoOptions ¶
type KanikoOptions struct {
RegistryOptions
CacheOptions
Destinations multiArg
BuildArgs multiArg
Labels multiArg
Annotations keyValueArg
Git KanikoGitOptions
IgnorePaths multiArg
DockerfilePath string
SrcContext string
SnapshotMode string
SnapshotModeDeprecated string
CustomPlatform string
CustomPlatformDeprecated string
Bucket string
TarPath string
TarPathDeprecated string
KanikoDir string
Target string
CacheRepo string
DigestFile string
ImageNameDigestFile string
ImageNameTagDigestFile string
OCILayoutPath string
Compression Compression
CompressionLevel int
ImageFSExtractRetry int
SingleSnapshot bool
Reproducible bool
NoPush bool
NoPushCache bool
Cache bool
PreCleanup bool
Cleanup bool
CompressedCaching bool
IgnoreVarRun bool
SkipUnusedStages bool
RunV2 bool
CacheCopyLayers bool
CacheRunLayers bool
ForceBuildMetadataDeprecated bool
InitialFSUnpacked bool
SkipPushPermissionCheck bool
PreserveContext bool
Materialize bool
Secrets SecretOptions
}
KanikoOptions are options that are set by command line arguments
type KanikoStage ¶
type KanikoStage struct {
instructions.Stage
BaseImageIndex int
Final bool
BaseImageStoredLocally bool
SaveStage bool
MetaArgs []instructions.ArgCommand
Index int
}
KanikoStage wraps a stage of the Dockerfile and provides extra information
type RegistryOptions ¶
type RegistryOptions struct {
RegistryMaps multiKeyMultiValueArg
RegistryMirrors multiArg
InsecureRegistries multiArg
SkipTLSVerifyRegistries multiArg
RegistriesCertificates keyValueArg
RegistriesClientCertificates keyValueArg
SkipDefaultRegistryFallback bool
Insecure bool
SkipTLSVerify bool
InsecurePull bool
SkipTLSVerifyPull bool
PushIgnoreImmutableTagErrors bool
PushRetry int
ImageDownloadRetry int
CredentialHelpers multiArg
}
RegistryOptions are all the options related to the registries, set by command line arguments.
type SecretOption ¶ added in v1.26.3
type SecretOptions ¶ added in v1.26.3
type SecretOptions map[string]SecretOption
func (*SecretOptions) Set ¶ added in v1.26.3
func (s *SecretOptions) Set(val string) error
parsing --secret analogous to buildx reference https://docs.docker.com/reference/cli/docker/buildx/build/#secret
func (*SecretOptions) String ¶ added in v1.26.3
func (s *SecretOptions) String() string
func (*SecretOptions) Type ¶ added in v1.26.3
func (k *SecretOptions) Type() string
type WarmerOptions ¶
type WarmerOptions struct {
CacheOptions
RegistryOptions
CustomPlatform string
Images multiArg
Force bool
DockerfilePath string
BuildArgs multiArg
}
WarmerOptions are options that are set by command line arguments to the cache warmer.