vendor: update buildkit to v0.32.0-rc1
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
+2
-2
@@ -28,10 +28,10 @@ import (
|
||||
var reLocal = regexp.MustCompile(`.*\.localhost(?::\d{1,5})?$`)
|
||||
|
||||
// Detect the loopback IP (127.0.0.1)
|
||||
var reLoopback = regexp.MustCompile(regexp.QuoteMeta("127.0.0.1"))
|
||||
var reLoopback = regexp.MustCompile(`^127\.0\.0\.1(?::\d{1,5})?$`)
|
||||
|
||||
// Detect the loopback IPV6 (::1)
|
||||
var reipv6Loopback = regexp.MustCompile(regexp.QuoteMeta("::1"))
|
||||
var reipv6Loopback = regexp.MustCompile(`^(::1|\[::1\](?::\d{1,5})?)$`)
|
||||
|
||||
// Registry stores a docker registry name in a structured form.
|
||||
type Registry struct {
|
||||
|
||||
+5
-4
@@ -85,11 +85,12 @@ func NewRepository(name string, opts ...Option) (Repository, error) {
|
||||
var registry string
|
||||
repo := name
|
||||
parts := strings.SplitN(name, regRepoDelimiter, 2)
|
||||
if len(parts) == 2 && (strings.ContainsRune(parts[0], '.') || strings.ContainsRune(parts[0], ':')) {
|
||||
maybeRegistry := parts[0]
|
||||
if len(parts) == 2 && (maybeRegistry == "localhost" || strings.ContainsAny(maybeRegistry, ".:")) {
|
||||
// The first part of the repository is treated as the registry domain
|
||||
// iff it contains a '.' or ':' character, otherwise it is all repository
|
||||
// and the domain defaults to Docker Hub.
|
||||
registry = parts[0]
|
||||
// if it is localhost or contains a '.' or ':' character, otherwise it
|
||||
// is all repository and the domain defaults to Docker Hub.
|
||||
registry = maybeRegistry
|
||||
repo = parts[1]
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user