vendor: update buildkit to master@67a08623b95a
Signed-off-by: Justin Chadwell <me@jedevc.com>pull/1873/head
parent
2c02db8db4
commit
9d2388e6f5
@ -0,0 +1,75 @@
|
|||||||
|
package exptypes
|
||||||
|
|
||||||
|
import commonexptypes "github.com/moby/buildkit/exporter/exptypes"
|
||||||
|
|
||||||
|
type ImageExporterOptKey string
|
||||||
|
|
||||||
|
// Options keys supported by the image exporter output.
|
||||||
|
var (
|
||||||
|
// Name of the image.
|
||||||
|
// Value: string
|
||||||
|
OptKeyName ImageExporterOptKey = "name"
|
||||||
|
|
||||||
|
// Push after creating image.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyPush ImageExporterOptKey = "push"
|
||||||
|
|
||||||
|
// Push unnamed image.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyPushByDigest ImageExporterOptKey = "push-by-digest"
|
||||||
|
|
||||||
|
// Allow pushing to insecure HTTP registry.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyInsecure ImageExporterOptKey = "registry.insecure"
|
||||||
|
|
||||||
|
// Unpack image after it's created (containerd).
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyUnpack ImageExporterOptKey = "unpack"
|
||||||
|
|
||||||
|
// Fallback image name prefix if image name isn't provided.
|
||||||
|
// If used, image will be named as <value>@<digest>
|
||||||
|
// Value: string
|
||||||
|
OptKeyDanglingPrefix ImageExporterOptKey = "dangling-name-prefix"
|
||||||
|
|
||||||
|
// Creates additional image name with format <name>@<digest>
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyNameCanonical ImageExporterOptKey = "name-canonical"
|
||||||
|
|
||||||
|
// Store the resulting image along with all of the content it references.
|
||||||
|
// Ignored if the worker doesn't have image store (e.g. OCI worker).
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyStore ImageExporterOptKey = "store"
|
||||||
|
|
||||||
|
// Use OCI mediatypes instead of Docker in JSON configs.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyOCITypes ImageExporterOptKey = "oci-mediatypes"
|
||||||
|
|
||||||
|
// Force attestation to be attached.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyForceInlineAttestations ImageExporterOptKey = "attestation-inline"
|
||||||
|
|
||||||
|
// Mark layers as non-distributable if they are found to use a
|
||||||
|
// non-distributable media type. When this option is not set, the exporter
|
||||||
|
// will change the media type of the layer to a distributable one.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyPreferNondistLayers ImageExporterOptKey = "prefer-nondist-layers"
|
||||||
|
|
||||||
|
// Clamp produced timestamps. For more information see the
|
||||||
|
// SOURCE_DATE_EPOCH specification.
|
||||||
|
// Value: int (number of seconds since Unix epoch)
|
||||||
|
OptKeySourceDateEpoch ImageExporterOptKey = ImageExporterOptKey(commonexptypes.OptKeySourceDateEpoch)
|
||||||
|
|
||||||
|
// Compression type for newly created and cached layers.
|
||||||
|
// estargz should be used with OptKeyOCITypes set to true.
|
||||||
|
// Value: string <uncompressed|gzip|estargz|zstd>
|
||||||
|
OptKeyLayerCompression ImageExporterOptKey = "compression"
|
||||||
|
|
||||||
|
// Force compression on all (including existing) layers.
|
||||||
|
// Value: bool <true|false>
|
||||||
|
OptKeyForceCompression ImageExporterOptKey = "force-compression"
|
||||||
|
|
||||||
|
// Compression level
|
||||||
|
// Value: int (0-9) for gzip and estargz
|
||||||
|
// Value: int (0-22) for zstd
|
||||||
|
OptKeyCompressionLevel ImageExporterOptKey = "compression-level"
|
||||||
|
)
|
@ -0,0 +1,15 @@
|
|||||||
|
package exptypes
|
||||||
|
|
||||||
|
const (
|
||||||
|
ExporterEpochKey = "source.date.epoch"
|
||||||
|
)
|
||||||
|
|
||||||
|
type ExporterOptKey string
|
||||||
|
|
||||||
|
// Options keys supported by all exporters.
|
||||||
|
var (
|
||||||
|
// Clamp produced timestamps. For more information see the
|
||||||
|
// SOURCE_DATE_EPOCH specification.
|
||||||
|
// Value: int (number of seconds since Unix epoch)
|
||||||
|
OptKeySourceDateEpoch ExporterOptKey = "source-date-epoch"
|
||||||
|
)
|
@ -1,10 +0,0 @@
|
|||||||
//go:build !windows
|
|
||||||
// +build !windows
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
// CheckSystemDriveAndRemoveDriveLetter verifies that a path, if it includes a drive letter,
|
|
||||||
// is the system drive. This is a no-op on Linux.
|
|
||||||
func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {
|
|
||||||
return path, nil
|
|
||||||
}
|
|
@ -1,35 +0,0 @@
|
|||||||
//go:build windows
|
|
||||||
// +build windows
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
import (
|
|
||||||
"path/filepath"
|
|
||||||
"strings"
|
|
||||||
|
|
||||||
"github.com/pkg/errors"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CheckSystemDriveAndRemoveDriveLetter verifies and manipulates a Windows path.
|
|
||||||
// This is used, for example, when validating a user provided path in docker cp.
|
|
||||||
// If a drive letter is supplied, it must be the system drive. The drive letter
|
|
||||||
// is always removed. Also, it translates it to OS semantics (IOW / to \). We
|
|
||||||
// need the path in this syntax so that it can ultimately be contatenated with
|
|
||||||
// a Windows long-path which doesn't support drive-letters. Examples:
|
|
||||||
// C: --> Fail
|
|
||||||
// C:\ --> \
|
|
||||||
// a --> a
|
|
||||||
// /a --> \a
|
|
||||||
// d:\ --> Fail
|
|
||||||
func CheckSystemDriveAndRemoveDriveLetter(path string) (string, error) {
|
|
||||||
if len(path) == 2 && string(path[1]) == ":" {
|
|
||||||
return "", errors.Errorf("No relative path specified in %q", path)
|
|
||||||
}
|
|
||||||
if !filepath.IsAbs(path) || len(path) < 2 {
|
|
||||||
return filepath.FromSlash(path), nil
|
|
||||||
}
|
|
||||||
if string(path[1]) == ":" && !strings.EqualFold(string(path[0]), "c") {
|
|
||||||
return "", errors.New("The specified path is not on the system drive (C:)")
|
|
||||||
}
|
|
||||||
return filepath.FromSlash(path[2:]), nil
|
|
||||||
}
|
|
Loading…
Reference in New Issue