mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-10 05:27:07 +08:00
tests: create remote with container helper
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"io"
|
||||
"net"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/buildx/store"
|
||||
"github.com/docker/buildx/util/progress"
|
||||
@ -67,6 +68,19 @@ type Driver interface {
|
||||
Config() InitConfig
|
||||
}
|
||||
|
||||
const builderNamePrefix = "buildx_buildkit_"
|
||||
|
||||
func BuilderName(name string) string {
|
||||
return builderNamePrefix + name
|
||||
}
|
||||
|
||||
func ParseBuilderName(name string) (string, error) {
|
||||
if !strings.HasPrefix(name, builderNamePrefix) {
|
||||
return "", errors.Errorf("invalid builder name %q, must have %q prefix", name, builderNamePrefix)
|
||||
}
|
||||
return strings.TrimPrefix(name, builderNamePrefix), nil
|
||||
}
|
||||
|
||||
func Boot(ctx, clientContext context.Context, d *DriverHandle, pw progress.Writer) (*client.Client, error) {
|
||||
try := 0
|
||||
for {
|
||||
|
Reference in New Issue
Block a user