mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Implement new driver-opt: default-load
This eases build driver migrations, as it allows aligning the default behavior. See also https://docs.docker.com/build/drivers/ Signed-off-by: Niklas Gehlen <niklas@namespacelabs.com>
This commit is contained in:
@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"net/url"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
// import connhelpers for special url schemes
|
||||
@ -80,6 +81,12 @@ func (f *factory) New(ctx context.Context, cfg driver.InitConfig) (driver.Driver
|
||||
}
|
||||
tls.key = v
|
||||
tlsEnabled = true
|
||||
case "default-load":
|
||||
parsed, err := strconv.ParseBool(v)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
d.defaultLoad = parsed
|
||||
default:
|
||||
return nil, errors.Errorf("invalid driver option %s for remote driver", k)
|
||||
}
|
||||
|
Reference in New Issue
Block a user