pull/1861/merge
CrazyMax 2 years ago committed by GitHub
commit 48df062f73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,12 +17,8 @@ import (
"github.com/docker/buildx/build" "github.com/docker/buildx/build"
controllerapi "github.com/docker/buildx/controller/pb" controllerapi "github.com/docker/buildx/controller/pb"
"github.com/docker/buildx/util/buildflags" "github.com/docker/buildx/util/buildflags"
"github.com/docker/buildx/util/platformutil"
"github.com/docker/cli/cli/config"
hcl "github.com/hashicorp/hcl/v2" hcl "github.com/hashicorp/hcl/v2"
"github.com/moby/buildkit/client/llb" "github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/session/auth/authprovider"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/zclconf/go-cty/cty" "github.com/zclconf/go-cty/cty"
"github.com/zclconf/go-cty/cty/convert" "github.com/zclconf/go-cty/cty/convert"
@ -911,26 +907,26 @@ func (t *Target) GetName(ectx *hcl.EvalContext, block *hcl.Block, loadDeps func(
return value.AsString(), nil return value.AsString(), nil
} }
func TargetsToBuildOpt(m map[string]*Target, inp *Input) (map[string]build.Options, error) { func TargetsToControllerOptions(m map[string]*Target, inp *Input) (map[string]controllerapi.BuildOptions, error) {
m2 := make(map[string]build.Options, len(m)) m2 := make(map[string]controllerapi.BuildOptions, len(m))
for k, v := range m { for k, v := range m {
bo, err := toBuildOpt(v, inp) opts, err := toControllerOpt(v, inp)
if err != nil { if err != nil {
return nil, err return nil, err
} }
m2[k] = *bo m2[k] = *opts
} }
return m2, nil return m2, nil
} }
func updateContext(t *build.Inputs, inp *Input) { func updateContext(t *controllerapi.Inputs, inp *Input) error {
if inp == nil || inp.State == nil { if inp == nil || inp.State == nil {
return return nil
} }
for k, v := range t.NamedContexts { for k, v := range t.NamedContexts {
if v.Path == "." { if v.Path == "." {
t.NamedContexts[k] = build.NamedContext{Path: inp.URL} t.NamedContexts[k] = &controllerapi.NamedContext{Path: inp.URL}
} }
if strings.HasPrefix(v.Path, "cwd://") || strings.HasPrefix(v.Path, "target:") || strings.HasPrefix(v.Path, "docker-image:") { if strings.HasPrefix(v.Path, "cwd://") || strings.HasPrefix(v.Path, "target:") || strings.HasPrefix(v.Path, "docker-image:") {
continue continue
@ -939,18 +935,22 @@ func updateContext(t *build.Inputs, inp *Input) {
continue continue
} }
st := llb.Scratch().File(llb.Copy(*inp.State, v.Path, "/"), llb.WithCustomNamef("set context %s to %s", k, v.Path)) st := llb.Scratch().File(llb.Copy(*inp.State, v.Path, "/"), llb.WithCustomNamef("set context %s to %s", k, v.Path))
t.NamedContexts[k] = build.NamedContext{State: &st} def, err := st.Marshal(context.TODO())
if err != nil {
return err
}
t.NamedContexts[k] = &controllerapi.NamedContext{Definition: def.ToPB()}
} }
if t.ContextPath == "." { if t.ContextPath == "." {
t.ContextPath = inp.URL t.ContextPath = inp.URL
return return nil
} }
if strings.HasPrefix(t.ContextPath, "cwd://") { if strings.HasPrefix(t.ContextPath, "cwd://") {
return return nil
} }
if build.IsRemoteURL(t.ContextPath) { if build.IsRemoteURL(t.ContextPath) {
return return nil
} }
st := llb.Scratch().File( st := llb.Scratch().File(
llb.Copy(*inp.State, t.ContextPath, "/", &llb.CopyInfo{ llb.Copy(*inp.State, t.ContextPath, "/", &llb.CopyInfo{
@ -958,13 +958,18 @@ func updateContext(t *build.Inputs, inp *Input) {
}), }),
llb.WithCustomNamef("set context to %s", t.ContextPath), llb.WithCustomNamef("set context to %s", t.ContextPath),
) )
t.ContextState = &st def, err := st.Marshal(context.TODO())
if err != nil {
return err
}
t.ContextDefinition = def.ToPB()
return nil
} }
// validateContextsEntitlements is a basic check to ensure contexts do not // validateContextsEntitlements is a basic check to ensure contexts do not
// escape local directories when loaded from remote sources. This is to be // escape local directories when loaded from remote sources. This is to be
// replaced with proper entitlements support in the future. // replaced with proper entitlements support in the future.
func validateContextsEntitlements(t build.Inputs, inp *Input) error { func validateContextsEntitlements(t controllerapi.Inputs, inp *Input) error {
if inp == nil || inp.State == nil { if inp == nil || inp.State == nil {
return nil return nil
} }
@ -973,13 +978,13 @@ func validateContextsEntitlements(t build.Inputs, inp *Input) error {
return nil return nil
} }
} }
if t.ContextState == nil { if t.ContextDefinition == nil {
if err := checkPath(t.ContextPath); err != nil { if err := checkPath(t.ContextPath); err != nil {
return err return err
} }
} }
for _, v := range t.NamedContexts { for _, v := range t.NamedContexts {
if v.State != nil { if v.Definition != nil {
continue continue
} }
if err := checkPath(v.Path); err != nil { if err := checkPath(v.Path); err != nil {
@ -1019,7 +1024,9 @@ func checkPath(p string) error {
return nil return nil
} }
func toBuildOpt(t *Target, inp *Input) (*build.Options, error) { func toControllerOpt(t *Target, inp *Input) (*controllerapi.BuildOptions, error) {
var err error
if v := t.Context; v != nil && *v == "-" { if v := t.Context; v != nil && *v == "-" {
return nil, errors.Errorf("context from stdin not allowed in bake") return nil, errors.Errorf("context from stdin not allowed in bake")
} }
@ -1039,24 +1046,24 @@ func toBuildOpt(t *Target, inp *Input) (*build.Options, error) {
dockerfilePath = *t.Dockerfile dockerfilePath = *t.Dockerfile
} }
bi := build.Inputs{ bi := controllerapi.Inputs{
ContextPath: contextPath, ContextPath: contextPath,
DockerfilePath: dockerfilePath, DockerfileName: dockerfilePath,
NamedContexts: toNamedContexts(t.Contexts), NamedContexts: toNamedContexts(t.Contexts),
} }
if t.DockerfileInline != nil { if t.DockerfileInline != nil {
bi.DockerfileInline = *t.DockerfileInline bi.DockerfileInline = *t.DockerfileInline
} }
updateContext(&bi, inp) updateContext(&bi, inp)
if !build.IsRemoteURL(bi.ContextPath) && bi.ContextState == nil && !path.IsAbs(bi.DockerfilePath) { if !build.IsRemoteURL(bi.ContextPath) && bi.ContextDefinition == nil && !path.IsAbs(bi.DockerfileName) {
bi.DockerfilePath = path.Join(bi.ContextPath, bi.DockerfilePath) bi.DockerfileName = path.Join(bi.ContextPath, bi.DockerfileName)
} }
if strings.HasPrefix(bi.ContextPath, "cwd://") { if strings.HasPrefix(bi.ContextPath, "cwd://") {
bi.ContextPath = path.Clean(strings.TrimPrefix(bi.ContextPath, "cwd://")) bi.ContextPath = path.Clean(strings.TrimPrefix(bi.ContextPath, "cwd://"))
} }
for k, v := range bi.NamedContexts { for k, v := range bi.NamedContexts {
if strings.HasPrefix(v.Path, "cwd://") { if strings.HasPrefix(v.Path, "cwd://") {
bi.NamedContexts[k] = build.NamedContext{Path: path.Clean(strings.TrimPrefix(v.Path, "cwd://"))} bi.NamedContexts[k] = &controllerapi.NamedContext{Path: path.Clean(strings.TrimPrefix(v.Path, "cwd://"))}
} }
} }
@ -1095,87 +1102,61 @@ func toBuildOpt(t *Target, inp *Input) (*build.Options, error) {
networkMode = *t.NetworkMode networkMode = *t.NetworkMode
} }
bo := &build.Options{ opts := &controllerapi.BuildOptions{
Inputs: bi, Inputs: &bi,
Opts: &controllerapi.CommonOptions{
NoCache: noCache,
Pull: pull,
Linked: t.linked,
},
Tags: t.Tags, Tags: t.Tags,
BuildArgs: args, BuildArgs: args,
Labels: labels, Labels: labels,
NoCache: noCache,
NoCacheFilter: t.NoCacheFilter, NoCacheFilter: t.NoCacheFilter,
Pull: pull,
NetworkMode: networkMode, NetworkMode: networkMode,
Linked: t.linked, Platforms: t.Platforms,
} }
platforms, err := platformutil.Parse(t.Platforms) if t.Target != nil {
if err != nil { opts.Target = *t.Target
return nil, err
} }
bo.Platforms = platforms
dockerConfig := config.LoadDefaultConfigFile(os.Stderr)
bo.Session = append(bo.Session, authprovider.NewDockerAuthProvider(dockerConfig))
secrets, err := buildflags.ParseSecretSpecs(t.Secrets) opts.Secrets, err = buildflags.ParseSecretSpecs(t.Secrets)
if err != nil {
return nil, err
}
secretAttachment, err := controllerapi.CreateSecrets(secrets)
if err != nil { if err != nil {
return nil, err return nil, err
} }
bo.Session = append(bo.Session, secretAttachment)
sshSpecs, err := buildflags.ParseSSHSpecs(t.SSH) opts.SSH, err = buildflags.ParseSSHSpecs(t.SSH)
if err != nil { if err != nil {
return nil, err return nil, err
} }
if len(sshSpecs) == 0 && (buildflags.IsGitSSH(bi.ContextPath) || (inp != nil && buildflags.IsGitSSH(inp.URL))) {
sshSpecs = append(sshSpecs, &controllerapi.SSH{ID: "default"})
}
sshAttachment, err := controllerapi.CreateSSH(sshSpecs)
if err != nil {
return nil, err
}
bo.Session = append(bo.Session, sshAttachment)
if t.Target != nil {
bo.Target = *t.Target
}
cacheImports, err := buildflags.ParseCacheEntry(t.CacheFrom) opts.CacheFrom, err = buildflags.ParseCacheEntry(t.CacheFrom)
if err != nil { if err != nil {
return nil, err return nil, err
} }
bo.CacheFrom = controllerapi.CreateCaches(cacheImports)
cacheExports, err := buildflags.ParseCacheEntry(t.CacheTo) opts.CacheTo, err = buildflags.ParseCacheEntry(t.CacheTo)
if err != nil { if err != nil {
return nil, err return nil, err
} }
bo.CacheTo = controllerapi.CreateCaches(cacheExports)
outputs, err := buildflags.ParseExports(t.Outputs) opts.Exports, err = buildflags.ParseExports(t.Outputs)
if err != nil {
return nil, err
}
bo.Exports, err = controllerapi.CreateExports(outputs)
if err != nil { if err != nil {
return nil, err return nil, err
} }
attests, err := buildflags.ParseAttests(t.Attest) opts.Attests, err = buildflags.ParseAttests(t.Attest)
if err != nil { if err != nil {
return nil, err return nil, err
} }
bo.Attests = controllerapi.CreateAttestations(attests)
bo.SourcePolicy, err = build.ReadSourcePolicy() opts.SourcePolicy, err = build.ReadSourcePolicy()
if err != nil { if err != nil {
return nil, err return nil, err
} }
return bo, nil return opts, nil
} }
func defaultTarget() *Target { func defaultTarget() *Target {
@ -1264,10 +1245,10 @@ func sliceEqual(s1, s2 []string) bool {
return true return true
} }
func toNamedContexts(m map[string]string) map[string]build.NamedContext { func toNamedContexts(m map[string]string) map[string]*controllerapi.NamedContext {
m2 := make(map[string]build.NamedContext, len(m)) m2 := make(map[string]*controllerapi.NamedContext, len(m))
for k, v := range m { for k, v := range m {
m2[k] = build.NamedContext{Path: v} m2[k] = &controllerapi.NamedContext{Path: v}
} }
return m2 return m2
} }

@ -7,6 +7,7 @@ import (
"strings" "strings"
"testing" "testing"
"github.com/docker/buildx/controller/pb"
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
) )
@ -390,7 +391,7 @@ func TestHCLCwdPrefix(t *testing.T) {
_, ok := m["app"] _, ok := m["app"]
require.True(t, ok) require.True(t, ok)
_, err = TargetsToBuildOpt(m, &Input{}) _, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, "test", *m["app"].Dockerfile) require.Equal(t, "test", *m["app"].Dockerfile)
@ -421,7 +422,7 @@ func TestOverrideMerge(t *testing.T) {
_, ok := m["app"] _, ok := m["app"]
require.True(t, ok) require.True(t, ok)
_, err = TargetsToBuildOpt(m, &Input{}) _, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, []string{"linux/arm", "linux/ppc64le"}, m["app"].Platforms) require.Equal(t, []string{"linux/arm", "linux/ppc64le"}, m["app"].Platforms)
@ -456,7 +457,7 @@ func TestReadContexts(t *testing.T) {
_, ok := m["app"] _, ok := m["app"]
require.True(t, ok) require.True(t, ok)
bo, err := TargetsToBuildOpt(m, &Input{}) bo, err := TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
ctxs := bo["app"].Inputs.NamedContexts ctxs := bo["app"].Inputs.NamedContexts
@ -472,7 +473,7 @@ func TestReadContexts(t *testing.T) {
_, ok = m["app"] _, ok = m["app"]
require.True(t, ok) require.True(t, ok)
bo, err = TargetsToBuildOpt(m, &Input{}) bo, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
ctxs = bo["app"].Inputs.NamedContexts ctxs = bo["app"].Inputs.NamedContexts
@ -490,7 +491,7 @@ func TestReadContexts(t *testing.T) {
_, ok = m["app"] _, ok = m["app"]
require.True(t, ok) require.True(t, ok)
bo, err = TargetsToBuildOpt(m, &Input{}) bo, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
ctxs = bo["app"].Inputs.NamedContexts ctxs = bo["app"].Inputs.NamedContexts
@ -1325,7 +1326,7 @@ func TestHCLNullVars(t *testing.T) {
_, ok := m["default"] _, ok := m["default"]
require.True(t, ok) require.True(t, ok)
_, err = TargetsToBuildOpt(m, &Input{}) _, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, map[string]*string{"bar": ptrstr("baz")}, m["default"].Args) require.Equal(t, map[string]*string{"bar": ptrstr("baz")}, m["default"].Args)
require.Equal(t, map[string]*string{"com.docker.app.baz": ptrstr("foo")}, m["default"].Labels) require.Equal(t, map[string]*string{"com.docker.app.baz": ptrstr("foo")}, m["default"].Labels)
@ -1360,7 +1361,7 @@ func TestJSONNullVars(t *testing.T) {
_, ok := m["default"] _, ok := m["default"]
require.True(t, ok) require.True(t, ok)
_, err = TargetsToBuildOpt(m, &Input{}) _, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, map[string]*string{"bar": ptrstr("baz")}, m["default"].Args) require.Equal(t, map[string]*string{"bar": ptrstr("baz")}, m["default"].Args)
} }
@ -1432,21 +1433,34 @@ func TestAttestDuplicates(t *testing.T) {
require.Equal(t, []string{"type=sbom,foo=bar", "type=provenance,mode=max"}, m["default"].Attest) require.Equal(t, []string{"type=sbom,foo=bar", "type=provenance,mode=max"}, m["default"].Attest)
require.NoError(t, err) require.NoError(t, err)
opts, err := TargetsToBuildOpt(m, &Input{}) opts, err := TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, map[string]*string{ require.Equal(t, []*pb.Attest{
"sbom": ptrstr("type=sbom,foo=bar"), {
"provenance": ptrstr("type=provenance,mode=max"), Type: "sbom",
Attrs: "type=sbom,foo=bar",
},
{
Type: "provenance",
Attrs: "type=provenance,mode=max",
},
}, opts["default"].Attests) }, opts["default"].Attests)
m, _, err = ReadTargets(ctx, []File{fp}, []string{"default"}, []string{"*.attest=type=sbom,disabled=true"}, nil) m, _, err = ReadTargets(ctx, []File{fp}, []string{"default"}, []string{"*.attest=type=sbom,disabled=true"}, nil)
require.Equal(t, []string{"type=sbom,disabled=true", "type=provenance,mode=max"}, m["default"].Attest) require.Equal(t, []string{"type=sbom,disabled=true", "type=provenance,mode=max"}, m["default"].Attest)
require.NoError(t, err) require.NoError(t, err)
opts, err = TargetsToBuildOpt(m, &Input{}) opts, err = TargetsToControllerOptions(m, &Input{})
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, map[string]*string{ require.Equal(t, []*pb.Attest{
"sbom": nil, {
"provenance": ptrstr("type=provenance,mode=max"), Type: "sbom",
Disabled: true,
Attrs: "type=sbom,disabled=true",
},
{
Type: "provenance",
Attrs: "type=provenance,mode=max",
},
}, opts["default"].Attests) }, opts["default"].Attests)
} }

@ -676,7 +676,7 @@ func Build(ctx context.Context, nodes []builder.Node, opt map[string]Options, do
return BuildWithResultHandler(ctx, nodes, opt, docker, configDir, w, nil) return BuildWithResultHandler(ctx, nodes, opt, docker, configDir, w, nil)
} }
func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer, resultHandleFunc func(driverIndex int, rCtx *ResultHandle)) (resp map[string]*client.SolveResponse, err error) { func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[string]Options, docker *dockerutil.Client, configDir string, w progress.Writer, resultHandleFunc func(target string, rCtx *ResultHandle)) (resp map[string]*client.SolveResponse, err error) {
if len(nodes) == 0 { if len(nodes) == 0 {
return nil, errors.Errorf("driver required for build") return nil, errors.Errorf("driver required for build")
} }
@ -944,7 +944,7 @@ func BuildWithResultHandler(ctx context.Context, nodes []builder.Node, opt map[s
if resultHandleFunc != nil { if resultHandleFunc != nil {
var resultHandle *ResultHandle var resultHandle *ResultHandle
resultHandle, rr, err = NewResultHandle(ctx, cc, so, "buildx", buildFunc, ch) resultHandle, rr, err = NewResultHandle(ctx, cc, so, "buildx", buildFunc, ch)
resultHandleFunc(dp.driverIndex, resultHandle) resultHandleFunc(k, resultHandle)
} else { } else {
rr, err = c.Build(ctx, so, "buildx", buildFunc, ch) rr, err = c.Build(ctx, so, "buildx", buildFunc, ch)
} }

@ -160,6 +160,7 @@ func NewResultHandle(ctx context.Context, cc *client.Client, opt client.SolveOpt
opt.Ref = "" opt.Ref = ""
opt.Exports = nil opt.Exports = nil
opt.CacheExports = nil opt.CacheExports = nil
opt.Internal = true
_, respErr = cc.Build(ctx, opt, "buildx", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) { _, respErr = cc.Build(ctx, opt, "buildx", func(ctx context.Context, c gateway.Client) (*gateway.Result, error) {
res, err := evalDefinition(ctx, c, def) res, err := evalDefinition(ctx, c, def)
if err != nil { if err != nil {

@ -11,11 +11,11 @@ import (
"github.com/docker/buildx/bake" "github.com/docker/buildx/bake"
"github.com/docker/buildx/build" "github.com/docker/buildx/build"
"github.com/docker/buildx/builder" "github.com/docker/buildx/builder"
cbuild "github.com/docker/buildx/controller/build"
controllerapi "github.com/docker/buildx/controller/pb"
"github.com/docker/buildx/util/buildflags" "github.com/docker/buildx/util/buildflags"
"github.com/docker/buildx/util/cobrautil/completion" "github.com/docker/buildx/util/cobrautil/completion"
"github.com/docker/buildx/util/confutil"
"github.com/docker/buildx/util/desktop" "github.com/docker/buildx/util/desktop"
"github.com/docker/buildx/util/dockerutil"
"github.com/docker/buildx/util/progress" "github.com/docker/buildx/util/progress"
"github.com/docker/buildx/util/tracing" "github.com/docker/buildx/util/tracing"
"github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command"
@ -25,16 +25,15 @@ import (
) )
type bakeOptions struct { type bakeOptions struct {
files []string files []string
overrides []string overrides []string
printOnly bool printOnly bool
sbom string sbom string
provenance string provenance string
builder string
metadataFile string metadataFile string
exportPush bool
exportLoad bool controllerapi.CommonOptions
//control.ControlOptions
} }
func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags commonFlags) (err error) { func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags commonFlags) (err error) {
@ -69,12 +68,12 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
} }
overrides := in.overrides overrides := in.overrides
if in.exportPush { if in.ExportPush {
if in.exportLoad { if in.ExportLoad {
return errors.Errorf("push and load may not be set together at the moment") return errors.Errorf("push and load may not be set together at the moment")
} }
overrides = append(overrides, "*.push=true") overrides = append(overrides, "*.push=true")
} else if in.exportLoad { } else if in.ExportLoad {
overrides = append(overrides, "*.output=type=docker") overrides = append(overrides, "*.output=type=docker")
} }
if cFlags.noCache != nil { if cFlags.noCache != nil {
@ -102,7 +101,7 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
// instance only needed for reading remote bake files or building // instance only needed for reading remote bake files or building
if url != "" || !in.printOnly { if url != "" || !in.printOnly {
b, err := builder.New(dockerCli, b, err := builder.New(dockerCli,
builder.WithName(in.builder), builder.WithName(in.Builder),
builder.WithContextPathHash(contextPathHash), builder.WithContextPathHash(contextPathHash),
) )
if err != nil { if err != nil {
@ -176,11 +175,19 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
} }
// this function can update target context string from the input so call before printOnly check // this function can update target context string from the input so call before printOnly check
bo, err := bake.TargetsToBuildOpt(tgts, inp) opts, err := bake.TargetsToControllerOptions(tgts, inp)
if err != nil { if err != nil {
return err return err
} }
// set builder name and context hash for all targets
updatedOpts := make(map[string]controllerapi.BuildOptions, len(opts))
for i, opt := range opts {
opt.Opts.Builder = in.Builder
opt.Inputs.ContextPathHash = contextPathHash
updatedOpts[i] = opt
}
if in.printOnly { if in.printOnly {
dt, err := json.MarshalIndent(struct { dt, err := json.MarshalIndent(struct {
Group map[string]*bake.Group `json:"group,omitempty"` Group map[string]*bake.Group `json:"group,omitempty"`
@ -201,7 +208,7 @@ func runBake(dockerCli command.Cli, targets []string, in bakeOptions, cFlags com
return nil return nil
} }
resp, err := build.Build(ctx, nodes, bo, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), printer) resp, _, err := cbuild.RunBuilds(ctx, dockerCli, updatedOpts, os.Stdin, printer, false)
if err != nil { if err != nil {
return wrapBuildError(err, true) return wrapBuildError(err, true)
} }
@ -235,7 +242,7 @@ func bakeCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
if !cmd.Flags().Lookup("pull").Changed { if !cmd.Flags().Lookup("pull").Changed {
cFlags.pull = nil cFlags.pull = nil
} }
options.builder = rootOpts.builder options.Builder = rootOpts.builder
options.metadataFile = cFlags.metadataFile options.metadataFile = cFlags.metadataFile
// Other common flags (noCache, pull and progress) are processed in runBake function. // Other common flags (noCache, pull and progress) are processed in runBake function.
return runBake(dockerCli, args, options, cFlags) return runBake(dockerCli, args, options, cFlags)
@ -246,9 +253,9 @@ func bakeCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
flags := cmd.Flags() flags := cmd.Flags()
flags.StringArrayVarP(&options.files, "file", "f", []string{}, "Build definition file") flags.StringArrayVarP(&options.files, "file", "f", []string{}, "Build definition file")
flags.BoolVar(&options.exportLoad, "load", false, `Shorthand for "--set=*.output=type=docker"`) flags.BoolVar(&options.ExportLoad, "load", false, `Shorthand for "--set=*.output=type=docker"`)
flags.BoolVar(&options.printOnly, "print", false, "Print the options without building") flags.BoolVar(&options.printOnly, "print", false, "Print the options without building")
flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--set=*.output=type=registry"`) flags.BoolVar(&options.ExportPush, "push", false, `Shorthand for "--set=*.output=type=registry"`)
flags.StringVar(&options.sbom, "sbom", "", `Shorthand for "--set=*.attest=type=sbom"`) flags.StringVar(&options.sbom, "sbom", "", `Shorthand for "--set=*.attest=type=sbom"`)
flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--set=*.attest=type=provenance"`) flags.StringVar(&options.provenance, "provenance", "", `Shorthand for "--set=*.attest=type=provenance"`)
flags.StringArrayVar(&options.overrides, "set", nil, `Override target value (e.g., "targetpattern.key=value")`) flags.StringArrayVar(&options.overrides, "set", nil, `Override target value (e.g., "targetpattern.key=value")`)

@ -63,6 +63,7 @@ type buildOptions struct {
dockerfileName string dockerfileName string
extraHosts []string extraHosts []string
imageIDFile string imageIDFile string
metadataFile string
labels []string labels []string
networkMode string networkMode string
noCacheFilter []string noCacheFilter []string
@ -75,49 +76,51 @@ type buildOptions struct {
tags []string tags []string
target string target string
ulimits *dockeropts.UlimitOpt ulimits *dockeropts.UlimitOpt
attests []string
sbom string
provenance string
progress string
quiet bool
invoke *invokeConfig invoke *invokeConfig
noBuild bool noBuild bool
attests []string controllerapi.CommonOptions
sbom string
provenance string
progress string
quiet bool
builder string
metadataFile string
noCache bool
pull bool
exportPush bool
exportLoad bool
control.ControlOptions control.ControlOptions
} }
func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error) { func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error) {
var err error var err error
inputs := controllerapi.Inputs{
ContextPath: o.contextPath,
ContextPathHash: o.contextPath,
DockerfileName: o.dockerfileName,
}
if absContextPath, err := filepath.Abs(inputs.ContextPathHash); err == nil {
inputs.ContextPathHash = absContextPath
}
inputs.NamedContexts, err = buildflags.ParseContextNames(o.contexts)
if err != nil {
return nil, err
}
opts := controllerapi.BuildOptions{ opts := controllerapi.BuildOptions{
Allow: o.allow, Inputs: &inputs,
BuildArgs: listToMap(o.buildArgs, true), Opts: &o.CommonOptions,
CgroupParent: o.cgroupParent,
ContextPath: o.contextPath, Allow: o.allow,
DockerfileName: o.dockerfileName, BuildArgs: listToMap(o.buildArgs, true),
ExtraHosts: o.extraHosts, CgroupParent: o.cgroupParent,
Labels: listToMap(o.labels, false), ExtraHosts: o.extraHosts,
NetworkMode: o.networkMode, Labels: listToMap(o.labels, false),
NoCacheFilter: o.noCacheFilter, NetworkMode: o.networkMode,
Platforms: o.platforms, NoCacheFilter: o.noCacheFilter,
ShmSize: int64(o.shmSize), Platforms: o.platforms,
Tags: o.tags, ShmSize: int64(o.shmSize),
Target: o.target, Tags: o.tags,
Ulimits: dockerUlimitToControllerUlimit(o.ulimits), Target: o.target,
Builder: o.builder, Ulimits: dockerUlimitToControllerUlimit(o.ulimits),
NoCache: o.noCache,
Pull: o.pull,
ExportPush: o.exportPush,
ExportLoad: o.exportLoad,
} }
// TODO: extract env var parsing to a method easily usable by library consumers // TODO: extract env var parsing to a method easily usable by library consumers
@ -144,11 +147,6 @@ func (o *buildOptions) toControllerOptions() (*controllerapi.BuildOptions, error
return nil, err return nil, err
} }
opts.NamedContexts, err = buildflags.ParseContextNames(o.contexts)
if err != nil {
return nil, err
}
opts.Exports, err = buildflags.ParseExports(o.outputs) opts.Exports, err = buildflags.ParseExports(o.outputs)
if err != nil { if err != nil {
return nil, err return nil, err
@ -223,13 +221,9 @@ func runBuild(dockerCli command.Cli, options buildOptions) (err error) {
} }
} }
contextPathHash := options.contextPath
if absContextPath, err := filepath.Abs(contextPathHash); err == nil {
contextPathHash = absContextPath
}
b, err := builder.New(dockerCli, b, err := builder.New(dockerCli,
builder.WithName(options.builder), builder.WithName(options.Builder),
builder.WithContextPathHash(contextPathHash), builder.WithContextPathHash(opts.Inputs.ContextPathHash),
) )
if err != nil { if err != nil {
return err return err
@ -418,15 +412,15 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
Args: cli.ExactArgs(1), Args: cli.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error { RunE: func(cmd *cobra.Command, args []string) error {
options.contextPath = args[0] options.contextPath = args[0]
options.builder = rootOpts.builder options.Builder = rootOpts.builder
options.metadataFile = cFlags.metadataFile options.metadataFile = cFlags.metadataFile
options.noCache = false options.NoCache = false
if cFlags.noCache != nil { if cFlags.noCache != nil {
options.noCache = *cFlags.noCache options.NoCache = *cFlags.noCache
} }
options.pull = false options.Pull = false
if cFlags.pull != nil { if cFlags.pull != nil {
options.pull = *cFlags.pull options.Pull = *cFlags.pull
} }
options.progress = cFlags.progress options.progress = cFlags.progress
cmd.Flags().VisitAll(checkWarnedFlags) cmd.Flags().VisitAll(checkWarnedFlags)
@ -476,7 +470,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
flags.StringArrayVar(&options.labels, "label", []string{}, "Set metadata for an image") flags.StringArrayVar(&options.labels, "label", []string{}, "Set metadata for an image")
flags.BoolVar(&options.exportLoad, "load", false, `Shorthand for "--output=type=docker"`) flags.BoolVar(&options.ExportLoad, "load", false, `Shorthand for "--output=type=docker"`)
flags.StringVar(&options.networkMode, "network", "default", `Set the networking mode for the "RUN" instructions during build`) flags.StringVar(&options.networkMode, "network", "default", `Set the networking mode for the "RUN" instructions during build`)
@ -490,7 +484,7 @@ func buildCmd(dockerCli command.Cli, rootOpts *rootOptions) *cobra.Command {
flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets) [experimental]") flags.StringVar(&options.printFunc, "print", "", "Print result of information request (e.g., outline, targets) [experimental]")
} }
flags.BoolVar(&options.exportPush, "push", false, `Shorthand for "--output=type=registry"`) flags.BoolVar(&options.ExportPush, "push", false, `Shorthand for "--output=type=registry"`)
flags.BoolVarP(&options.quiet, "quiet", "q", false, "Suppress the build output and print image ID on success") flags.BoolVarP(&options.quiet, "quiet", "q", false, "Suppress the build output and print image ID on success")

@ -4,7 +4,6 @@ import (
"context" "context"
"io" "io"
"os" "os"
"path/filepath"
"strings" "strings"
"sync" "sync"
@ -23,9 +22,11 @@ import (
dockeropts "github.com/docker/cli/opts" dockeropts "github.com/docker/cli/opts"
"github.com/docker/go-units" "github.com/docker/go-units"
"github.com/moby/buildkit/client" "github.com/moby/buildkit/client"
"github.com/moby/buildkit/client/llb"
"github.com/moby/buildkit/session/auth/authprovider" "github.com/moby/buildkit/session/auth/authprovider"
"github.com/moby/buildkit/util/grpcerrors" "github.com/moby/buildkit/util/grpcerrors"
"github.com/pkg/errors" "github.com/pkg/errors"
"golang.org/x/sync/errgroup"
"google.golang.org/grpc/codes" "google.golang.org/grpc/codes"
) )
@ -37,29 +38,122 @@ const defaultTargetName = "default"
// this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can // this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can
// inspect the result and debug the cause of that error. // inspect the result and debug the cause of that error.
func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.BuildOptions, inStream io.Reader, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, error) { func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.BuildOptions, inStream io.Reader, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, error) {
if in.NoCache && len(in.NoCacheFilter) > 0 { cResp, cRes, err := RunBuilds(ctx, dockerCli, map[string]controllerapi.BuildOptions{defaultTargetName: in}, inStream, progress, generateResult)
return nil, nil, errors.Errorf("--no-cache and --no-cache-filter cannot currently be used together") var resp *client.SolveResponse
if v, ok := cResp[defaultTargetName]; ok {
resp = v
}
var res *build.ResultHandle
if v, ok := cRes[defaultTargetName]; ok {
res = v
}
return resp, res, err
}
// RunBuilds same as RunBuild but runs multiple builds.
func RunBuilds(ctx context.Context, dockerCli command.Cli, in map[string]controllerapi.BuildOptions, inStream io.Reader, progress progress.Writer, generateResult bool) (map[string]*client.SolveResponse, map[string]*build.ResultHandle, error) {
var err error
var builderName string
var contextPathHash string
opts := make(map[string]build.Options, len(in))
mu := sync.Mutex{}
eg, _ := errgroup.WithContext(ctx)
for t, o := range in {
func(t string, o controllerapi.BuildOptions) {
eg.Go(func() error {
opt, err := ToBuildOpts(o, inStream)
if err != nil {
return err
}
mu.Lock()
opts[t] = *opt
// we assume that all the targets are using the same builder and
// context path hash. This assumption is currently valid but, we
// may need to revisit this in the future.
if builderName == "" {
builderName = o.Opts.Builder
}
if contextPathHash == "" {
contextPathHash = o.Inputs.ContextPathHash
}
mu.Unlock()
return nil
})
}(t, o)
}
if err := eg.Wait(); err != nil {
return nil, nil, err
}
b, err := builder.New(dockerCli,
builder.WithName(builderName),
builder.WithContextPathHash(contextPathHash),
)
if err != nil {
return nil, nil, err
}
if err = updateLastActivity(dockerCli, b.NodeGroup); err != nil {
return nil, nil, errors.Wrapf(err, "failed to update builder last activity time")
}
nodes, err := b.LoadNodes(ctx, false)
if err != nil {
return nil, nil, err
}
resp, res, err := buildTargets(ctx, dockerCli, b.NodeGroup, nodes, opts, progress, generateResult)
err = wrapBuildError(err, false)
if err != nil {
return nil, nil, err
}
return resp, res, nil
}
func ToBuildOpts(in controllerapi.BuildOptions, inStream io.Reader) (*build.Options, error) {
if in.Opts.NoCache && len(in.NoCacheFilter) > 0 {
return nil, errors.Errorf("--no-cache and --no-cache-filter cannot currently be used together")
}
var ctxst *llb.State
if in.Inputs.ContextDefinition != nil {
defop, err := llb.NewDefinitionOp(in.Inputs.ContextDefinition)
if err != nil {
return nil, err
}
st := llb.NewState(defop)
ctxst = &st
} }
contexts := map[string]build.NamedContext{} contexts := map[string]build.NamedContext{}
for name, path := range in.NamedContexts { for name, nctx := range in.Inputs.NamedContexts {
contexts[name] = build.NamedContext{Path: path} if nctx.Definition != nil {
defop, err := llb.NewDefinitionOp(nctx.Definition)
if err != nil {
return nil, err
}
st := llb.NewState(defop)
contexts[name] = build.NamedContext{State: &st}
} else {
contexts[name] = build.NamedContext{Path: nctx.Path}
}
} }
opts := build.Options{ opts := build.Options{
Inputs: build.Inputs{ Inputs: build.Inputs{
ContextPath: in.ContextPath, ContextPath: in.Inputs.ContextPath,
DockerfilePath: in.DockerfileName, DockerfilePath: in.Inputs.DockerfileName,
InStream: inStream, DockerfileInline: in.Inputs.DockerfileInline,
NamedContexts: contexts, ContextState: ctxst,
InStream: inStream,
NamedContexts: contexts,
}, },
BuildArgs: in.BuildArgs, BuildArgs: in.BuildArgs,
ExtraHosts: in.ExtraHosts, ExtraHosts: in.ExtraHosts,
Labels: in.Labels, Labels: in.Labels,
NetworkMode: in.NetworkMode, NetworkMode: in.NetworkMode,
NoCache: in.NoCache, NoCache: in.Opts.NoCache,
NoCacheFilter: in.NoCacheFilter, NoCacheFilter: in.NoCacheFilter,
Pull: in.Pull, Pull: in.Opts.Pull,
ShmSize: dockeropts.MemBytes(in.ShmSize), ShmSize: dockeropts.MemBytes(in.ShmSize),
Tags: in.Tags, Tags: in.Tags,
Target: in.Target, Target: in.Target,
@ -68,7 +162,7 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
platforms, err := platformutil.Parse(in.Platforms) platforms, err := platformutil.Parse(in.Platforms)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
opts.Platforms = platforms opts.Platforms = platforms
@ -77,27 +171,27 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
secrets, err := controllerapi.CreateSecrets(in.Secrets) secrets, err := controllerapi.CreateSecrets(in.Secrets)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
opts.Session = append(opts.Session, secrets) opts.Session = append(opts.Session, secrets)
sshSpecs := in.SSH sshSpecs := in.SSH
if len(sshSpecs) == 0 && buildflags.IsGitSSH(in.ContextPath) { if len(sshSpecs) == 0 && buildflags.IsGitSSH(in.Inputs.ContextPath) {
sshSpecs = append(sshSpecs, &controllerapi.SSH{ID: "default"}) sshSpecs = append(sshSpecs, &controllerapi.SSH{ID: "default"})
} }
ssh, err := controllerapi.CreateSSH(sshSpecs) ssh, err := controllerapi.CreateSSH(sshSpecs)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
opts.Session = append(opts.Session, ssh) opts.Session = append(opts.Session, ssh)
outputs, err := controllerapi.CreateExports(in.Exports) outputs, err := controllerapi.CreateExports(in.Exports)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
if in.ExportPush { if in.Opts.ExportPush {
if in.ExportLoad { if in.Opts.ExportLoad {
return nil, nil, errors.Errorf("push and load may not be set together at the moment") return nil, errors.Errorf("push and load may not be set together at the moment")
} }
if len(outputs) == 0 { if len(outputs) == 0 {
outputs = []client.ExportEntry{{ outputs = []client.ExportEntry{{
@ -111,11 +205,11 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
case "image": case "image":
outputs[0].Attrs["push"] = "true" outputs[0].Attrs["push"] = "true"
default: default:
return nil, nil, errors.Errorf("push and %q output can't be used together", outputs[0].Type) return nil, errors.Errorf("push and %q output can't be used together", outputs[0].Type)
} }
} }
} }
if in.ExportLoad { if in.Opts.ExportLoad {
if len(outputs) == 0 { if len(outputs) == 0 {
outputs = []client.ExportEntry{{ outputs = []client.ExportEntry{{
Type: "docker", Type: "docker",
@ -125,7 +219,7 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
switch outputs[0].Type { switch outputs[0].Type {
case "docker": case "docker":
default: default:
return nil, nil, errors.Errorf("load and %q output can't be used together", outputs[0].Type) return nil, errors.Errorf("load and %q output can't be used together", outputs[0].Type)
} }
} }
} }
@ -140,7 +234,7 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
allow, err := buildflags.ParseEntitlements(in.Allow) allow, err := buildflags.ParseEntitlements(in.Allow)
if err != nil { if err != nil {
return nil, nil, err return nil, err
} }
opts.Allow = allow opts.Allow = allow
@ -151,35 +245,7 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
} }
} }
// key string used for kubernetes "sticky" mode return &opts, nil
contextPathHash, err := filepath.Abs(in.ContextPath)
if err != nil {
contextPathHash = in.ContextPath
}
// TODO: this should not be loaded this side of the controller api
b, err := builder.New(dockerCli,
builder.WithName(in.Builder),
builder.WithContextPathHash(contextPathHash),
)
if err != nil {
return nil, nil, err
}
if err = updateLastActivity(dockerCli, b.NodeGroup); err != nil {
return nil, nil, errors.Wrapf(err, "failed to update builder last activity time")
}
nodes, err := b.LoadNodes(ctx, false)
if err != nil {
return nil, nil, err
}
resp, res, err := buildTargets(ctx, dockerCli, b.NodeGroup, nodes, map[string]build.Options{defaultTargetName: opts}, progress, generateResult)
err = wrapBuildError(err, false)
if err != nil {
// NOTE: buildTargets can return *build.ResultHandle even on error.
return nil, res, err
}
return resp, res, nil
} }
// buildTargets runs the specified build and returns the result. // buildTargets runs the specified build and returns the result.
@ -187,19 +253,19 @@ func RunBuild(ctx context.Context, dockerCli command.Cli, in controllerapi.Build
// NOTE: When an error happens during the build and this function acquires the debuggable *build.ResultHandle, // NOTE: When an error happens during the build and this function acquires the debuggable *build.ResultHandle,
// this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can // this function returns it in addition to the error (i.e. it does "return nil, res, err"). The caller can
// inspect the result and debug the cause of that error. // inspect the result and debug the cause of that error.
func buildTargets(ctx context.Context, dockerCli command.Cli, ng *store.NodeGroup, nodes []builder.Node, opts map[string]build.Options, progress progress.Writer, generateResult bool) (*client.SolveResponse, *build.ResultHandle, error) { func buildTargets(ctx context.Context, dockerCli command.Cli, ng *store.NodeGroup, nodes []builder.Node, opts map[string]build.Options, progress progress.Writer, generateResult bool) (map[string]*client.SolveResponse, map[string]*build.ResultHandle, error) {
var res *build.ResultHandle var res map[string]*build.ResultHandle
var resp map[string]*client.SolveResponse var resp map[string]*client.SolveResponse
var err error var err error
if generateResult { if generateResult {
var mu sync.Mutex var mu sync.Mutex
var idx int resp, err = build.BuildWithResultHandler(ctx, nodes, opts, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), progress, func(target string, gotRes *build.ResultHandle) {
resp, err = build.BuildWithResultHandler(ctx, nodes, opts, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), progress, func(driverIndex int, gotRes *build.ResultHandle) {
mu.Lock() mu.Lock()
defer mu.Unlock() defer mu.Unlock()
if res == nil || driverIndex < idx { if res == nil {
idx, res = driverIndex, gotRes res = make(map[string]*build.ResultHandle)
} }
res[target] = gotRes
}) })
} else { } else {
resp, err = build.Build(ctx, nodes, opts, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), progress) resp, err = build.Build(ctx, nodes, opts, dockerutil.NewClient(dockerCli), confutil.ConfigDir(dockerCli), progress)
@ -207,7 +273,7 @@ func buildTargets(ctx context.Context, dockerCli command.Cli, ng *store.NodeGrou
if err != nil { if err != nil {
return nil, res, err return nil, res, err
} }
return resp[defaultTargetName], res, err return resp, res, err
} }
func wrapBuildError(err error, bake bool) error { func wrapBuildError(err error, bake bool) error {

@ -8,7 +8,8 @@ import (
fmt "fmt" fmt "fmt"
proto "github.com/gogo/protobuf/proto" proto "github.com/gogo/protobuf/proto"
control "github.com/moby/buildkit/api/services/control" control "github.com/moby/buildkit/api/services/control"
pb "github.com/moby/buildkit/sourcepolicy/pb" pb "github.com/moby/buildkit/solver/pb"
pb1 "github.com/moby/buildkit/sourcepolicy/pb"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
@ -270,35 +271,107 @@ func (m *BuildRequest) GetOptions() *BuildOptions {
return nil return nil
} }
type Inputs struct {
ContextPath string `protobuf:"bytes,1,opt,name=ContextPath,proto3" json:"ContextPath,omitempty"`
ContextPathHash string `protobuf:"bytes,2,opt,name=ContextPathHash,proto3" json:"ContextPathHash,omitempty"`
DockerfileName string `protobuf:"bytes,3,opt,name=DockerfileName,proto3" json:"DockerfileName,omitempty"`
DockerfileInline string `protobuf:"bytes,4,opt,name=DockerfileInline,proto3" json:"DockerfileInline,omitempty"`
ContextDefinition *pb.Definition `protobuf:"bytes,5,opt,name=ContextDefinition,proto3" json:"ContextDefinition,omitempty"`
NamedContexts map[string]*NamedContext `protobuf:"bytes,6,rep,name=NamedContexts,proto3" json:"NamedContexts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Inputs) Reset() { *m = Inputs{} }
func (m *Inputs) String() string { return proto.CompactTextString(m) }
func (*Inputs) ProtoMessage() {}
func (*Inputs) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{6}
}
func (m *Inputs) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Inputs.Unmarshal(m, b)
}
func (m *Inputs) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Inputs.Marshal(b, m, deterministic)
}
func (m *Inputs) XXX_Merge(src proto.Message) {
xxx_messageInfo_Inputs.Merge(m, src)
}
func (m *Inputs) XXX_Size() int {
return xxx_messageInfo_Inputs.Size(m)
}
func (m *Inputs) XXX_DiscardUnknown() {
xxx_messageInfo_Inputs.DiscardUnknown(m)
}
var xxx_messageInfo_Inputs proto.InternalMessageInfo
func (m *Inputs) GetContextPath() string {
if m != nil {
return m.ContextPath
}
return ""
}
func (m *Inputs) GetContextPathHash() string {
if m != nil {
return m.ContextPathHash
}
return ""
}
func (m *Inputs) GetDockerfileName() string {
if m != nil {
return m.DockerfileName
}
return ""
}
func (m *Inputs) GetDockerfileInline() string {
if m != nil {
return m.DockerfileInline
}
return ""
}
func (m *Inputs) GetContextDefinition() *pb.Definition {
if m != nil {
return m.ContextDefinition
}
return nil
}
func (m *Inputs) GetNamedContexts() map[string]*NamedContext {
if m != nil {
return m.NamedContexts
}
return nil
}
type BuildOptions struct { type BuildOptions struct {
ContextPath string `protobuf:"bytes,1,opt,name=ContextPath,proto3" json:"ContextPath,omitempty"` Inputs *Inputs `protobuf:"bytes,1,opt,name=Inputs,proto3" json:"Inputs,omitempty"`
DockerfileName string `protobuf:"bytes,2,opt,name=DockerfileName,proto3" json:"DockerfileName,omitempty"` PrintFunc *PrintFunc `protobuf:"bytes,2,opt,name=PrintFunc,proto3" json:"PrintFunc,omitempty"`
PrintFunc *PrintFunc `protobuf:"bytes,3,opt,name=PrintFunc,proto3" json:"PrintFunc,omitempty"` Opts *CommonOptions `protobuf:"bytes,3,opt,name=Opts,proto3" json:"Opts,omitempty"`
NamedContexts map[string]string `protobuf:"bytes,4,rep,name=NamedContexts,proto3" json:"NamedContexts,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Allow []string `protobuf:"bytes,4,rep,name=Allow,proto3" json:"Allow,omitempty"`
Allow []string `protobuf:"bytes,5,rep,name=Allow,proto3" json:"Allow,omitempty"` Attests []*Attest `protobuf:"bytes,5,rep,name=Attests,proto3" json:"Attests,omitempty"`
Attests []*Attest `protobuf:"bytes,6,rep,name=Attests,proto3" json:"Attests,omitempty"` BuildArgs map[string]string `protobuf:"bytes,6,rep,name=BuildArgs,proto3" json:"BuildArgs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
BuildArgs map[string]string `protobuf:"bytes,7,rep,name=BuildArgs,proto3" json:"BuildArgs,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` CacheFrom []*CacheOptionsEntry `protobuf:"bytes,7,rep,name=CacheFrom,proto3" json:"CacheFrom,omitempty"`
CacheFrom []*CacheOptionsEntry `protobuf:"bytes,8,rep,name=CacheFrom,proto3" json:"CacheFrom,omitempty"` CacheTo []*CacheOptionsEntry `protobuf:"bytes,8,rep,name=CacheTo,proto3" json:"CacheTo,omitempty"`
CacheTo []*CacheOptionsEntry `protobuf:"bytes,9,rep,name=CacheTo,proto3" json:"CacheTo,omitempty"` CgroupParent string `protobuf:"bytes,9,opt,name=CgroupParent,proto3" json:"CgroupParent,omitempty"`
CgroupParent string `protobuf:"bytes,10,opt,name=CgroupParent,proto3" json:"CgroupParent,omitempty"` Exports []*ExportEntry `protobuf:"bytes,10,rep,name=Exports,proto3" json:"Exports,omitempty"`
Exports []*ExportEntry `protobuf:"bytes,11,rep,name=Exports,proto3" json:"Exports,omitempty"` ExtraHosts []string `protobuf:"bytes,11,rep,name=ExtraHosts,proto3" json:"ExtraHosts,omitempty"`
ExtraHosts []string `protobuf:"bytes,12,rep,name=ExtraHosts,proto3" json:"ExtraHosts,omitempty"` Labels map[string]string `protobuf:"bytes,12,rep,name=Labels,proto3" json:"Labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
Labels map[string]string `protobuf:"bytes,13,rep,name=Labels,proto3" json:"Labels,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` NetworkMode string `protobuf:"bytes,13,opt,name=NetworkMode,proto3" json:"NetworkMode,omitempty"`
NetworkMode string `protobuf:"bytes,14,opt,name=NetworkMode,proto3" json:"NetworkMode,omitempty"` NoCacheFilter []string `protobuf:"bytes,14,rep,name=NoCacheFilter,proto3" json:"NoCacheFilter,omitempty"`
NoCacheFilter []string `protobuf:"bytes,15,rep,name=NoCacheFilter,proto3" json:"NoCacheFilter,omitempty"` Platforms []string `protobuf:"bytes,15,rep,name=Platforms,proto3" json:"Platforms,omitempty"`
Platforms []string `protobuf:"bytes,16,rep,name=Platforms,proto3" json:"Platforms,omitempty"` Secrets []*Secret `protobuf:"bytes,16,rep,name=Secrets,proto3" json:"Secrets,omitempty"`
Secrets []*Secret `protobuf:"bytes,17,rep,name=Secrets,proto3" json:"Secrets,omitempty"` ShmSize int64 `protobuf:"varint,17,opt,name=ShmSize,proto3" json:"ShmSize,omitempty"`
ShmSize int64 `protobuf:"varint,18,opt,name=ShmSize,proto3" json:"ShmSize,omitempty"` SSH []*SSH `protobuf:"bytes,18,rep,name=SSH,proto3" json:"SSH,omitempty"`
SSH []*SSH `protobuf:"bytes,19,rep,name=SSH,proto3" json:"SSH,omitempty"` Tags []string `protobuf:"bytes,19,rep,name=Tags,proto3" json:"Tags,omitempty"`
Tags []string `protobuf:"bytes,20,rep,name=Tags,proto3" json:"Tags,omitempty"` Target string `protobuf:"bytes,20,opt,name=Target,proto3" json:"Target,omitempty"`
Target string `protobuf:"bytes,21,opt,name=Target,proto3" json:"Target,omitempty"` Ulimits *UlimitOpt `protobuf:"bytes,21,opt,name=Ulimits,proto3" json:"Ulimits,omitempty"`
Ulimits *UlimitOpt `protobuf:"bytes,22,opt,name=Ulimits,proto3" json:"Ulimits,omitempty"` SourcePolicy *pb1.Policy `protobuf:"bytes,22,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"`
Builder string `protobuf:"bytes,23,opt,name=Builder,proto3" json:"Builder,omitempty"`
NoCache bool `protobuf:"varint,24,opt,name=NoCache,proto3" json:"NoCache,omitempty"`
Pull bool `protobuf:"varint,25,opt,name=Pull,proto3" json:"Pull,omitempty"`
ExportPush bool `protobuf:"varint,26,opt,name=ExportPush,proto3" json:"ExportPush,omitempty"`
ExportLoad bool `protobuf:"varint,27,opt,name=ExportLoad,proto3" json:"ExportLoad,omitempty"`
SourcePolicy *pb.Policy `protobuf:"bytes,28,opt,name=SourcePolicy,proto3" json:"SourcePolicy,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"` XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"` XXX_sizecache int32 `json:"-"`
@ -308,7 +381,7 @@ func (m *BuildOptions) Reset() { *m = BuildOptions{} }
func (m *BuildOptions) String() string { return proto.CompactTextString(m) } func (m *BuildOptions) String() string { return proto.CompactTextString(m) }
func (*BuildOptions) ProtoMessage() {} func (*BuildOptions) ProtoMessage() {}
func (*BuildOptions) Descriptor() ([]byte, []int) { func (*BuildOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{6} return fileDescriptor_ed7f10298fa1d90f, []int{7}
} }
func (m *BuildOptions) XXX_Unmarshal(b []byte) error { func (m *BuildOptions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuildOptions.Unmarshal(m, b) return xxx_messageInfo_BuildOptions.Unmarshal(m, b)
@ -328,18 +401,11 @@ func (m *BuildOptions) XXX_DiscardUnknown() {
var xxx_messageInfo_BuildOptions proto.InternalMessageInfo var xxx_messageInfo_BuildOptions proto.InternalMessageInfo
func (m *BuildOptions) GetContextPath() string { func (m *BuildOptions) GetInputs() *Inputs {
if m != nil { if m != nil {
return m.ContextPath return m.Inputs
} }
return "" return nil
}
func (m *BuildOptions) GetDockerfileName() string {
if m != nil {
return m.DockerfileName
}
return ""
} }
func (m *BuildOptions) GetPrintFunc() *PrintFunc { func (m *BuildOptions) GetPrintFunc() *PrintFunc {
@ -349,9 +415,9 @@ func (m *BuildOptions) GetPrintFunc() *PrintFunc {
return nil return nil
} }
func (m *BuildOptions) GetNamedContexts() map[string]string { func (m *BuildOptions) GetOpts() *CommonOptions {
if m != nil { if m != nil {
return m.NamedContexts return m.Opts
} }
return nil return nil
} }
@ -482,46 +548,140 @@ func (m *BuildOptions) GetUlimits() *UlimitOpt {
return nil return nil
} }
func (m *BuildOptions) GetBuilder() string { func (m *BuildOptions) GetSourcePolicy() *pb1.Policy {
if m != nil {
return m.SourcePolicy
}
return nil
}
type NamedContext struct {
Path string `protobuf:"bytes,1,opt,name=Path,proto3" json:"Path,omitempty"`
Definition *pb.Definition `protobuf:"bytes,2,opt,name=Definition,proto3" json:"Definition,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *NamedContext) Reset() { *m = NamedContext{} }
func (m *NamedContext) String() string { return proto.CompactTextString(m) }
func (*NamedContext) ProtoMessage() {}
func (*NamedContext) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{8}
}
func (m *NamedContext) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_NamedContext.Unmarshal(m, b)
}
func (m *NamedContext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_NamedContext.Marshal(b, m, deterministic)
}
func (m *NamedContext) XXX_Merge(src proto.Message) {
xxx_messageInfo_NamedContext.Merge(m, src)
}
func (m *NamedContext) XXX_Size() int {
return xxx_messageInfo_NamedContext.Size(m)
}
func (m *NamedContext) XXX_DiscardUnknown() {
xxx_messageInfo_NamedContext.DiscardUnknown(m)
}
var xxx_messageInfo_NamedContext proto.InternalMessageInfo
func (m *NamedContext) GetPath() string {
if m != nil {
return m.Path
}
return ""
}
func (m *NamedContext) GetDefinition() *pb.Definition {
if m != nil {
return m.Definition
}
return nil
}
type CommonOptions struct {
Builder string `protobuf:"bytes,1,opt,name=Builder,proto3" json:"Builder,omitempty"`
NoCache bool `protobuf:"varint,2,opt,name=NoCache,proto3" json:"NoCache,omitempty"`
// string Progress: no progress view on server side
Pull bool `protobuf:"varint,3,opt,name=Pull,proto3" json:"Pull,omitempty"`
ExportPush bool `protobuf:"varint,4,opt,name=ExportPush,proto3" json:"ExportPush,omitempty"`
ExportLoad bool `protobuf:"varint,5,opt,name=ExportLoad,proto3" json:"ExportLoad,omitempty"`
// TODO: we should remove Linked from the controllerapi, it's only used to
// produce a single warning. To allow this, we need to move the default
// export detection out from the controller server, as well as load the
// driver on the controller client.
Linked bool `protobuf:"varint,6,opt,name=Linked,proto3" json:"Linked,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *CommonOptions) Reset() { *m = CommonOptions{} }
func (m *CommonOptions) String() string { return proto.CompactTextString(m) }
func (*CommonOptions) ProtoMessage() {}
func (*CommonOptions) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{9}
}
func (m *CommonOptions) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CommonOptions.Unmarshal(m, b)
}
func (m *CommonOptions) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_CommonOptions.Marshal(b, m, deterministic)
}
func (m *CommonOptions) XXX_Merge(src proto.Message) {
xxx_messageInfo_CommonOptions.Merge(m, src)
}
func (m *CommonOptions) XXX_Size() int {
return xxx_messageInfo_CommonOptions.Size(m)
}
func (m *CommonOptions) XXX_DiscardUnknown() {
xxx_messageInfo_CommonOptions.DiscardUnknown(m)
}
var xxx_messageInfo_CommonOptions proto.InternalMessageInfo
func (m *CommonOptions) GetBuilder() string {
if m != nil { if m != nil {
return m.Builder return m.Builder
} }
return "" return ""
} }
func (m *BuildOptions) GetNoCache() bool { func (m *CommonOptions) GetNoCache() bool {
if m != nil { if m != nil {
return m.NoCache return m.NoCache
} }
return false return false
} }
func (m *BuildOptions) GetPull() bool { func (m *CommonOptions) GetPull() bool {
if m != nil { if m != nil {
return m.Pull return m.Pull
} }
return false return false
} }
func (m *BuildOptions) GetExportPush() bool { func (m *CommonOptions) GetExportPush() bool {
if m != nil { if m != nil {
return m.ExportPush return m.ExportPush
} }
return false return false
} }
func (m *BuildOptions) GetExportLoad() bool { func (m *CommonOptions) GetExportLoad() bool {
if m != nil { if m != nil {
return m.ExportLoad return m.ExportLoad
} }
return false return false
} }
func (m *BuildOptions) GetSourcePolicy() *pb.Policy { func (m *CommonOptions) GetLinked() bool {
if m != nil { if m != nil {
return m.SourcePolicy return m.Linked
} }
return nil return false
} }
type ExportEntry struct { type ExportEntry struct {
@ -537,7 +697,7 @@ func (m *ExportEntry) Reset() { *m = ExportEntry{} }
func (m *ExportEntry) String() string { return proto.CompactTextString(m) } func (m *ExportEntry) String() string { return proto.CompactTextString(m) }
func (*ExportEntry) ProtoMessage() {} func (*ExportEntry) ProtoMessage() {}
func (*ExportEntry) Descriptor() ([]byte, []int) { func (*ExportEntry) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{7} return fileDescriptor_ed7f10298fa1d90f, []int{10}
} }
func (m *ExportEntry) XXX_Unmarshal(b []byte) error { func (m *ExportEntry) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExportEntry.Unmarshal(m, b) return xxx_messageInfo_ExportEntry.Unmarshal(m, b)
@ -590,7 +750,7 @@ func (m *CacheOptionsEntry) Reset() { *m = CacheOptionsEntry{} }
func (m *CacheOptionsEntry) String() string { return proto.CompactTextString(m) } func (m *CacheOptionsEntry) String() string { return proto.CompactTextString(m) }
func (*CacheOptionsEntry) ProtoMessage() {} func (*CacheOptionsEntry) ProtoMessage() {}
func (*CacheOptionsEntry) Descriptor() ([]byte, []int) { func (*CacheOptionsEntry) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{8} return fileDescriptor_ed7f10298fa1d90f, []int{11}
} }
func (m *CacheOptionsEntry) XXX_Unmarshal(b []byte) error { func (m *CacheOptionsEntry) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_CacheOptionsEntry.Unmarshal(m, b) return xxx_messageInfo_CacheOptionsEntry.Unmarshal(m, b)
@ -637,7 +797,7 @@ func (m *Attest) Reset() { *m = Attest{} }
func (m *Attest) String() string { return proto.CompactTextString(m) } func (m *Attest) String() string { return proto.CompactTextString(m) }
func (*Attest) ProtoMessage() {} func (*Attest) ProtoMessage() {}
func (*Attest) Descriptor() ([]byte, []int) { func (*Attest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{9} return fileDescriptor_ed7f10298fa1d90f, []int{12}
} }
func (m *Attest) XXX_Unmarshal(b []byte) error { func (m *Attest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Attest.Unmarshal(m, b) return xxx_messageInfo_Attest.Unmarshal(m, b)
@ -690,7 +850,7 @@ func (m *SSH) Reset() { *m = SSH{} }
func (m *SSH) String() string { return proto.CompactTextString(m) } func (m *SSH) String() string { return proto.CompactTextString(m) }
func (*SSH) ProtoMessage() {} func (*SSH) ProtoMessage() {}
func (*SSH) Descriptor() ([]byte, []int) { func (*SSH) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{10} return fileDescriptor_ed7f10298fa1d90f, []int{13}
} }
func (m *SSH) XXX_Unmarshal(b []byte) error { func (m *SSH) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SSH.Unmarshal(m, b) return xxx_messageInfo_SSH.Unmarshal(m, b)
@ -737,7 +897,7 @@ func (m *Secret) Reset() { *m = Secret{} }
func (m *Secret) String() string { return proto.CompactTextString(m) } func (m *Secret) String() string { return proto.CompactTextString(m) }
func (*Secret) ProtoMessage() {} func (*Secret) ProtoMessage() {}
func (*Secret) Descriptor() ([]byte, []int) { func (*Secret) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{11} return fileDescriptor_ed7f10298fa1d90f, []int{14}
} }
func (m *Secret) XXX_Unmarshal(b []byte) error { func (m *Secret) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Secret.Unmarshal(m, b) return xxx_messageInfo_Secret.Unmarshal(m, b)
@ -790,7 +950,7 @@ func (m *PrintFunc) Reset() { *m = PrintFunc{} }
func (m *PrintFunc) String() string { return proto.CompactTextString(m) } func (m *PrintFunc) String() string { return proto.CompactTextString(m) }
func (*PrintFunc) ProtoMessage() {} func (*PrintFunc) ProtoMessage() {}
func (*PrintFunc) Descriptor() ([]byte, []int) { func (*PrintFunc) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{12} return fileDescriptor_ed7f10298fa1d90f, []int{15}
} }
func (m *PrintFunc) XXX_Unmarshal(b []byte) error { func (m *PrintFunc) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PrintFunc.Unmarshal(m, b) return xxx_messageInfo_PrintFunc.Unmarshal(m, b)
@ -835,7 +995,7 @@ func (m *InspectRequest) Reset() { *m = InspectRequest{} }
func (m *InspectRequest) String() string { return proto.CompactTextString(m) } func (m *InspectRequest) String() string { return proto.CompactTextString(m) }
func (*InspectRequest) ProtoMessage() {} func (*InspectRequest) ProtoMessage() {}
func (*InspectRequest) Descriptor() ([]byte, []int) { func (*InspectRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{13} return fileDescriptor_ed7f10298fa1d90f, []int{16}
} }
func (m *InspectRequest) XXX_Unmarshal(b []byte) error { func (m *InspectRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InspectRequest.Unmarshal(m, b) return xxx_messageInfo_InspectRequest.Unmarshal(m, b)
@ -873,7 +1033,7 @@ func (m *InspectResponse) Reset() { *m = InspectResponse{} }
func (m *InspectResponse) String() string { return proto.CompactTextString(m) } func (m *InspectResponse) String() string { return proto.CompactTextString(m) }
func (*InspectResponse) ProtoMessage() {} func (*InspectResponse) ProtoMessage() {}
func (*InspectResponse) Descriptor() ([]byte, []int) { func (*InspectResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{14} return fileDescriptor_ed7f10298fa1d90f, []int{17}
} }
func (m *InspectResponse) XXX_Unmarshal(b []byte) error { func (m *InspectResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InspectResponse.Unmarshal(m, b) return xxx_messageInfo_InspectResponse.Unmarshal(m, b)
@ -911,7 +1071,7 @@ func (m *UlimitOpt) Reset() { *m = UlimitOpt{} }
func (m *UlimitOpt) String() string { return proto.CompactTextString(m) } func (m *UlimitOpt) String() string { return proto.CompactTextString(m) }
func (*UlimitOpt) ProtoMessage() {} func (*UlimitOpt) ProtoMessage() {}
func (*UlimitOpt) Descriptor() ([]byte, []int) { func (*UlimitOpt) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{15} return fileDescriptor_ed7f10298fa1d90f, []int{18}
} }
func (m *UlimitOpt) XXX_Unmarshal(b []byte) error { func (m *UlimitOpt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_UlimitOpt.Unmarshal(m, b) return xxx_messageInfo_UlimitOpt.Unmarshal(m, b)
@ -951,7 +1111,7 @@ func (m *Ulimit) Reset() { *m = Ulimit{} }
func (m *Ulimit) String() string { return proto.CompactTextString(m) } func (m *Ulimit) String() string { return proto.CompactTextString(m) }
func (*Ulimit) ProtoMessage() {} func (*Ulimit) ProtoMessage() {}
func (*Ulimit) Descriptor() ([]byte, []int) { func (*Ulimit) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{16} return fileDescriptor_ed7f10298fa1d90f, []int{19}
} }
func (m *Ulimit) XXX_Unmarshal(b []byte) error { func (m *Ulimit) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Ulimit.Unmarshal(m, b) return xxx_messageInfo_Ulimit.Unmarshal(m, b)
@ -1003,7 +1163,7 @@ func (m *BuildResponse) Reset() { *m = BuildResponse{} }
func (m *BuildResponse) String() string { return proto.CompactTextString(m) } func (m *BuildResponse) String() string { return proto.CompactTextString(m) }
func (*BuildResponse) ProtoMessage() {} func (*BuildResponse) ProtoMessage() {}
func (*BuildResponse) Descriptor() ([]byte, []int) { func (*BuildResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{17} return fileDescriptor_ed7f10298fa1d90f, []int{20}
} }
func (m *BuildResponse) XXX_Unmarshal(b []byte) error { func (m *BuildResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuildResponse.Unmarshal(m, b) return xxx_messageInfo_BuildResponse.Unmarshal(m, b)
@ -1041,7 +1201,7 @@ func (m *DisconnectRequest) Reset() { *m = DisconnectRequest{} }
func (m *DisconnectRequest) String() string { return proto.CompactTextString(m) } func (m *DisconnectRequest) String() string { return proto.CompactTextString(m) }
func (*DisconnectRequest) ProtoMessage() {} func (*DisconnectRequest) ProtoMessage() {}
func (*DisconnectRequest) Descriptor() ([]byte, []int) { func (*DisconnectRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{18} return fileDescriptor_ed7f10298fa1d90f, []int{21}
} }
func (m *DisconnectRequest) XXX_Unmarshal(b []byte) error { func (m *DisconnectRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DisconnectRequest.Unmarshal(m, b) return xxx_messageInfo_DisconnectRequest.Unmarshal(m, b)
@ -1078,7 +1238,7 @@ func (m *DisconnectResponse) Reset() { *m = DisconnectResponse{} }
func (m *DisconnectResponse) String() string { return proto.CompactTextString(m) } func (m *DisconnectResponse) String() string { return proto.CompactTextString(m) }
func (*DisconnectResponse) ProtoMessage() {} func (*DisconnectResponse) ProtoMessage() {}
func (*DisconnectResponse) Descriptor() ([]byte, []int) { func (*DisconnectResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{19} return fileDescriptor_ed7f10298fa1d90f, []int{22}
} }
func (m *DisconnectResponse) XXX_Unmarshal(b []byte) error { func (m *DisconnectResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DisconnectResponse.Unmarshal(m, b) return xxx_messageInfo_DisconnectResponse.Unmarshal(m, b)
@ -1109,7 +1269,7 @@ func (m *ListRequest) Reset() { *m = ListRequest{} }
func (m *ListRequest) String() string { return proto.CompactTextString(m) } func (m *ListRequest) String() string { return proto.CompactTextString(m) }
func (*ListRequest) ProtoMessage() {} func (*ListRequest) ProtoMessage() {}
func (*ListRequest) Descriptor() ([]byte, []int) { func (*ListRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{20} return fileDescriptor_ed7f10298fa1d90f, []int{23}
} }
func (m *ListRequest) XXX_Unmarshal(b []byte) error { func (m *ListRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListRequest.Unmarshal(m, b) return xxx_messageInfo_ListRequest.Unmarshal(m, b)
@ -1147,7 +1307,7 @@ func (m *ListResponse) Reset() { *m = ListResponse{} }
func (m *ListResponse) String() string { return proto.CompactTextString(m) } func (m *ListResponse) String() string { return proto.CompactTextString(m) }
func (*ListResponse) ProtoMessage() {} func (*ListResponse) ProtoMessage() {}
func (*ListResponse) Descriptor() ([]byte, []int) { func (*ListResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{21} return fileDescriptor_ed7f10298fa1d90f, []int{24}
} }
func (m *ListResponse) XXX_Unmarshal(b []byte) error { func (m *ListResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ListResponse.Unmarshal(m, b) return xxx_messageInfo_ListResponse.Unmarshal(m, b)
@ -1188,7 +1348,7 @@ func (m *InputMessage) Reset() { *m = InputMessage{} }
func (m *InputMessage) String() string { return proto.CompactTextString(m) } func (m *InputMessage) String() string { return proto.CompactTextString(m) }
func (*InputMessage) ProtoMessage() {} func (*InputMessage) ProtoMessage() {}
func (*InputMessage) Descriptor() ([]byte, []int) { func (*InputMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{22} return fileDescriptor_ed7f10298fa1d90f, []int{25}
} }
func (m *InputMessage) XXX_Unmarshal(b []byte) error { func (m *InputMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputMessage.Unmarshal(m, b) return xxx_messageInfo_InputMessage.Unmarshal(m, b)
@ -1262,7 +1422,7 @@ func (m *InputInitMessage) Reset() { *m = InputInitMessage{} }
func (m *InputInitMessage) String() string { return proto.CompactTextString(m) } func (m *InputInitMessage) String() string { return proto.CompactTextString(m) }
func (*InputInitMessage) ProtoMessage() {} func (*InputInitMessage) ProtoMessage() {}
func (*InputInitMessage) Descriptor() ([]byte, []int) { func (*InputInitMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{23} return fileDescriptor_ed7f10298fa1d90f, []int{26}
} }
func (m *InputInitMessage) XXX_Unmarshal(b []byte) error { func (m *InputInitMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputInitMessage.Unmarshal(m, b) return xxx_messageInfo_InputInitMessage.Unmarshal(m, b)
@ -1301,7 +1461,7 @@ func (m *DataMessage) Reset() { *m = DataMessage{} }
func (m *DataMessage) String() string { return proto.CompactTextString(m) } func (m *DataMessage) String() string { return proto.CompactTextString(m) }
func (*DataMessage) ProtoMessage() {} func (*DataMessage) ProtoMessage() {}
func (*DataMessage) Descriptor() ([]byte, []int) { func (*DataMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{24} return fileDescriptor_ed7f10298fa1d90f, []int{27}
} }
func (m *DataMessage) XXX_Unmarshal(b []byte) error { func (m *DataMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DataMessage.Unmarshal(m, b) return xxx_messageInfo_DataMessage.Unmarshal(m, b)
@ -1345,7 +1505,7 @@ func (m *InputResponse) Reset() { *m = InputResponse{} }
func (m *InputResponse) String() string { return proto.CompactTextString(m) } func (m *InputResponse) String() string { return proto.CompactTextString(m) }
func (*InputResponse) ProtoMessage() {} func (*InputResponse) ProtoMessage() {}
func (*InputResponse) Descriptor() ([]byte, []int) { func (*InputResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{25} return fileDescriptor_ed7f10298fa1d90f, []int{28}
} }
func (m *InputResponse) XXX_Unmarshal(b []byte) error { func (m *InputResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InputResponse.Unmarshal(m, b) return xxx_messageInfo_InputResponse.Unmarshal(m, b)
@ -1381,7 +1541,7 @@ func (m *Message) Reset() { *m = Message{} }
func (m *Message) String() string { return proto.CompactTextString(m) } func (m *Message) String() string { return proto.CompactTextString(m) }
func (*Message) ProtoMessage() {} func (*Message) ProtoMessage() {}
func (*Message) Descriptor() ([]byte, []int) { func (*Message) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{26} return fileDescriptor_ed7f10298fa1d90f, []int{29}
} }
func (m *Message) XXX_Unmarshal(b []byte) error { func (m *Message) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Message.Unmarshal(m, b) return xxx_messageInfo_Message.Unmarshal(m, b)
@ -1483,7 +1643,7 @@ func (m *InitMessage) Reset() { *m = InitMessage{} }
func (m *InitMessage) String() string { return proto.CompactTextString(m) } func (m *InitMessage) String() string { return proto.CompactTextString(m) }
func (*InitMessage) ProtoMessage() {} func (*InitMessage) ProtoMessage() {}
func (*InitMessage) Descriptor() ([]byte, []int) { func (*InitMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{27} return fileDescriptor_ed7f10298fa1d90f, []int{30}
} }
func (m *InitMessage) XXX_Unmarshal(b []byte) error { func (m *InitMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InitMessage.Unmarshal(m, b) return xxx_messageInfo_InitMessage.Unmarshal(m, b)
@ -1544,7 +1704,7 @@ func (m *InvokeConfig) Reset() { *m = InvokeConfig{} }
func (m *InvokeConfig) String() string { return proto.CompactTextString(m) } func (m *InvokeConfig) String() string { return proto.CompactTextString(m) }
func (*InvokeConfig) ProtoMessage() {} func (*InvokeConfig) ProtoMessage() {}
func (*InvokeConfig) Descriptor() ([]byte, []int) { func (*InvokeConfig) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{28} return fileDescriptor_ed7f10298fa1d90f, []int{31}
} }
func (m *InvokeConfig) XXX_Unmarshal(b []byte) error { func (m *InvokeConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InvokeConfig.Unmarshal(m, b) return xxx_messageInfo_InvokeConfig.Unmarshal(m, b)
@ -1647,7 +1807,7 @@ func (m *FdMessage) Reset() { *m = FdMessage{} }
func (m *FdMessage) String() string { return proto.CompactTextString(m) } func (m *FdMessage) String() string { return proto.CompactTextString(m) }
func (*FdMessage) ProtoMessage() {} func (*FdMessage) ProtoMessage() {}
func (*FdMessage) Descriptor() ([]byte, []int) { func (*FdMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{29} return fileDescriptor_ed7f10298fa1d90f, []int{32}
} }
func (m *FdMessage) XXX_Unmarshal(b []byte) error { func (m *FdMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_FdMessage.Unmarshal(m, b) return xxx_messageInfo_FdMessage.Unmarshal(m, b)
@ -1700,7 +1860,7 @@ func (m *ResizeMessage) Reset() { *m = ResizeMessage{} }
func (m *ResizeMessage) String() string { return proto.CompactTextString(m) } func (m *ResizeMessage) String() string { return proto.CompactTextString(m) }
func (*ResizeMessage) ProtoMessage() {} func (*ResizeMessage) ProtoMessage() {}
func (*ResizeMessage) Descriptor() ([]byte, []int) { func (*ResizeMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{30} return fileDescriptor_ed7f10298fa1d90f, []int{33}
} }
func (m *ResizeMessage) XXX_Unmarshal(b []byte) error { func (m *ResizeMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ResizeMessage.Unmarshal(m, b) return xxx_messageInfo_ResizeMessage.Unmarshal(m, b)
@ -1747,7 +1907,7 @@ func (m *SignalMessage) Reset() { *m = SignalMessage{} }
func (m *SignalMessage) String() string { return proto.CompactTextString(m) } func (m *SignalMessage) String() string { return proto.CompactTextString(m) }
func (*SignalMessage) ProtoMessage() {} func (*SignalMessage) ProtoMessage() {}
func (*SignalMessage) Descriptor() ([]byte, []int) { func (*SignalMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{31} return fileDescriptor_ed7f10298fa1d90f, []int{34}
} }
func (m *SignalMessage) XXX_Unmarshal(b []byte) error { func (m *SignalMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_SignalMessage.Unmarshal(m, b) return xxx_messageInfo_SignalMessage.Unmarshal(m, b)
@ -1785,7 +1945,7 @@ func (m *StatusRequest) Reset() { *m = StatusRequest{} }
func (m *StatusRequest) String() string { return proto.CompactTextString(m) } func (m *StatusRequest) String() string { return proto.CompactTextString(m) }
func (*StatusRequest) ProtoMessage() {} func (*StatusRequest) ProtoMessage() {}
func (*StatusRequest) Descriptor() ([]byte, []int) { func (*StatusRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{32} return fileDescriptor_ed7f10298fa1d90f, []int{35}
} }
func (m *StatusRequest) XXX_Unmarshal(b []byte) error { func (m *StatusRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusRequest.Unmarshal(m, b) return xxx_messageInfo_StatusRequest.Unmarshal(m, b)
@ -1826,7 +1986,7 @@ func (m *StatusResponse) Reset() { *m = StatusResponse{} }
func (m *StatusResponse) String() string { return proto.CompactTextString(m) } func (m *StatusResponse) String() string { return proto.CompactTextString(m) }
func (*StatusResponse) ProtoMessage() {} func (*StatusResponse) ProtoMessage() {}
func (*StatusResponse) Descriptor() ([]byte, []int) { func (*StatusResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{33} return fileDescriptor_ed7f10298fa1d90f, []int{36}
} }
func (m *StatusResponse) XXX_Unmarshal(b []byte) error { func (m *StatusResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StatusResponse.Unmarshal(m, b) return xxx_messageInfo_StatusResponse.Unmarshal(m, b)
@ -1884,7 +2044,7 @@ func (m *InfoRequest) Reset() { *m = InfoRequest{} }
func (m *InfoRequest) String() string { return proto.CompactTextString(m) } func (m *InfoRequest) String() string { return proto.CompactTextString(m) }
func (*InfoRequest) ProtoMessage() {} func (*InfoRequest) ProtoMessage() {}
func (*InfoRequest) Descriptor() ([]byte, []int) { func (*InfoRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{34} return fileDescriptor_ed7f10298fa1d90f, []int{37}
} }
func (m *InfoRequest) XXX_Unmarshal(b []byte) error { func (m *InfoRequest) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InfoRequest.Unmarshal(m, b) return xxx_messageInfo_InfoRequest.Unmarshal(m, b)
@ -1915,7 +2075,7 @@ func (m *InfoResponse) Reset() { *m = InfoResponse{} }
func (m *InfoResponse) String() string { return proto.CompactTextString(m) } func (m *InfoResponse) String() string { return proto.CompactTextString(m) }
func (*InfoResponse) ProtoMessage() {} func (*InfoResponse) ProtoMessage() {}
func (*InfoResponse) Descriptor() ([]byte, []int) { func (*InfoResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{35} return fileDescriptor_ed7f10298fa1d90f, []int{38}
} }
func (m *InfoResponse) XXX_Unmarshal(b []byte) error { func (m *InfoResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_InfoResponse.Unmarshal(m, b) return xxx_messageInfo_InfoResponse.Unmarshal(m, b)
@ -1955,7 +2115,7 @@ func (m *BuildxVersion) Reset() { *m = BuildxVersion{} }
func (m *BuildxVersion) String() string { return proto.CompactTextString(m) } func (m *BuildxVersion) String() string { return proto.CompactTextString(m) }
func (*BuildxVersion) ProtoMessage() {} func (*BuildxVersion) ProtoMessage() {}
func (*BuildxVersion) Descriptor() ([]byte, []int) { func (*BuildxVersion) Descriptor() ([]byte, []int) {
return fileDescriptor_ed7f10298fa1d90f, []int{36} return fileDescriptor_ed7f10298fa1d90f, []int{39}
} }
func (m *BuildxVersion) XXX_Unmarshal(b []byte) error { func (m *BuildxVersion) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BuildxVersion.Unmarshal(m, b) return xxx_messageInfo_BuildxVersion.Unmarshal(m, b)
@ -2003,10 +2163,13 @@ func init() {
proto.RegisterType((*DisconnectProcessRequest)(nil), "buildx.controller.v1.DisconnectProcessRequest") proto.RegisterType((*DisconnectProcessRequest)(nil), "buildx.controller.v1.DisconnectProcessRequest")
proto.RegisterType((*DisconnectProcessResponse)(nil), "buildx.controller.v1.DisconnectProcessResponse") proto.RegisterType((*DisconnectProcessResponse)(nil), "buildx.controller.v1.DisconnectProcessResponse")
proto.RegisterType((*BuildRequest)(nil), "buildx.controller.v1.BuildRequest") proto.RegisterType((*BuildRequest)(nil), "buildx.controller.v1.BuildRequest")
proto.RegisterType((*Inputs)(nil), "buildx.controller.v1.Inputs")
proto.RegisterMapType((map[string]*NamedContext)(nil), "buildx.controller.v1.Inputs.NamedContextsEntry")
proto.RegisterType((*BuildOptions)(nil), "buildx.controller.v1.BuildOptions") proto.RegisterType((*BuildOptions)(nil), "buildx.controller.v1.BuildOptions")
proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.BuildOptions.BuildArgsEntry") proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.BuildOptions.BuildArgsEntry")
proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.BuildOptions.LabelsEntry") proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.BuildOptions.LabelsEntry")
proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.BuildOptions.NamedContextsEntry") proto.RegisterType((*NamedContext)(nil), "buildx.controller.v1.NamedContext")
proto.RegisterType((*CommonOptions)(nil), "buildx.controller.v1.CommonOptions")
proto.RegisterType((*ExportEntry)(nil), "buildx.controller.v1.ExportEntry") proto.RegisterType((*ExportEntry)(nil), "buildx.controller.v1.ExportEntry")
proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.ExportEntry.AttrsEntry") proto.RegisterMapType((map[string]string)(nil), "buildx.controller.v1.ExportEntry.AttrsEntry")
proto.RegisterType((*CacheOptionsEntry)(nil), "buildx.controller.v1.CacheOptionsEntry") proto.RegisterType((*CacheOptionsEntry)(nil), "buildx.controller.v1.CacheOptionsEntry")
@ -2046,125 +2209,134 @@ func init() {
func init() { proto.RegisterFile("controller.proto", fileDescriptor_ed7f10298fa1d90f) } func init() { proto.RegisterFile("controller.proto", fileDescriptor_ed7f10298fa1d90f) }
var fileDescriptor_ed7f10298fa1d90f = []byte{ var fileDescriptor_ed7f10298fa1d90f = []byte{
// 1881 bytes of a gzipped FileDescriptorProto // 2030 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x6f, 0xdb, 0xc8, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x58, 0x5f, 0x73, 0xdb, 0xc6,
0x11, 0x2f, 0x25, 0x59, 0x7f, 0x46, 0x96, 0xe3, 0x6c, 0x9d, 0x74, 0xc3, 0xa4, 0x17, 0x87, 0x49, 0x11, 0x2f, 0x48, 0x8a, 0x7f, 0x96, 0xa2, 0x2c, 0x5f, 0x65, 0x0f, 0xc2, 0xb8, 0x89, 0x0c, 0xdb,
0xae, 0x42, 0x53, 0x48, 0x77, 0xbe, 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b8, 0x6d, 0x3e, 0xcf, 0x07, 0x29, 0xa5, 0x5f, 0x1a, 0x08, 0xeb, 0x9c, 0x88,
0xac, 0x9c, 0xa2, 0xa7, 0x6f, 0x4c, 0x96, 0x03, 0x52, 0xf5, 0xa5, 0x65, 0xa0, 0x1f, 0xa0, 0xac,
0xb2, 0x1a, 0xfa, 0xc5, 0x72, 0x42, 0xa4, 0x2f, 0xff, 0x73, 0xcb, 0xf8, 0xd2, 0x40, 0xef, 0xa0,
0x24, 0xca, 0x39, 0xca, 0xa8, 0x4d, 0x89, 0x5e, 0xa0, 0x69, 0xe5, 0x41, 0xb4, 0x17, 0x7f, 0x02,
0x98, 0x37, 0x15, 0x28, 0xe3, 0xff, 0x92, 0x85, 0xee, 0xa4, 0xd9, 0xba, 0x1d, 0xa8, 0x17, 0x78,
0x27, 0x2a, 0xea, 0x39, 0x45, 0x99, 0xb5, 0x34, 0xbe, 0x46, 0x4d, 0x2b, 0x0f, 0xa2, 0xd5, 0x5d,
0x40, 0x23, 0xf5, 0xef, 0x35, 0xfa, 0x3c, 0xdb, 0xc8, 0x9b, 0x7f, 0x86, 0x37, 0x5f, 0xde, 0x09,
0xab, 0x57, 0xe2, 0xc9, 0xae, 0x4c, 0x7f, 0x46, 0xf6, 0x6d, 0x76, 0xa7, 0xff, 0x89, 0x6e, 0xb6,
0xef, 0x8c, 0x57, 0xab, 0xee, 0x96, 0x7e, 0x53, 0x08, 0xfa, 0xfd, 0xb2, 0xfc, 0x53, 0xff, 0xeb,
0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x90, 0x18, 0xf3, 0xa0, 0x18, 0x00, 0x00,
} }
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.

@ -4,6 +4,7 @@ package buildx.controller.v1;
import "github.com/moby/buildkit/api/services/control/control.proto"; import "github.com/moby/buildkit/api/services/control/control.proto";
import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto"; import "github.com/moby/buildkit/sourcepolicy/pb/policy.proto";
import "github.com/moby/buildkit/solver/pb/ops.proto";
option go_package = "pb"; option go_package = "pb";
@ -46,37 +47,59 @@ message BuildRequest {
BuildOptions Options = 2; BuildOptions Options = 2;
} }
message BuildOptions { message Inputs {
string ContextPath = 1; string ContextPath = 1;
string DockerfileName = 2; string ContextPathHash = 2;
PrintFunc PrintFunc = 3; string DockerfileName = 3;
map<string, string> NamedContexts = 4; string DockerfileInline = 4;
pb.Definition ContextDefinition = 5;
repeated string Allow = 5; map<string, NamedContext> NamedContexts = 6;
repeated Attest Attests = 6; // io.Reader InStream = ???;
map<string, string> BuildArgs = 7; }
repeated CacheOptionsEntry CacheFrom = 8;
repeated CacheOptionsEntry CacheTo = 9; message BuildOptions {
string CgroupParent = 10; Inputs Inputs = 1;
repeated ExportEntry Exports = 11; PrintFunc PrintFunc = 2;
repeated string ExtraHosts = 12; CommonOptions Opts = 3;
map<string, string> Labels = 13;
string NetworkMode = 14; repeated string Allow = 4;
repeated string NoCacheFilter = 15; repeated Attest Attests = 5;
repeated string Platforms = 16; map<string, string> BuildArgs = 6;
repeated Secret Secrets = 17; repeated CacheOptionsEntry CacheFrom = 7;
int64 ShmSize = 18; repeated CacheOptionsEntry CacheTo = 8;
repeated SSH SSH = 19; string CgroupParent = 9;
repeated string Tags = 20; repeated ExportEntry Exports = 10;
string Target = 21; repeated string ExtraHosts = 11;
UlimitOpt Ulimits = 22; map<string, string> Labels = 12;
string NetworkMode = 13;
string Builder = 23; repeated string NoCacheFilter = 14;
bool NoCache = 24; repeated string Platforms = 15;
bool Pull = 25; repeated Secret Secrets = 16;
bool ExportPush = 26; int64 ShmSize = 17;
bool ExportLoad = 27; repeated SSH SSH = 18;
moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 28; repeated string Tags = 19;
string Target = 20;
UlimitOpt Ulimits = 21;
moby.buildkit.v1.sourcepolicy.Policy SourcePolicy = 22;
}
message NamedContext {
string Path = 1;
pb.Definition Definition = 2;
}
message CommonOptions {
string Builder = 1;
bool NoCache = 2;
// string Progress: no progress view on server side
bool Pull = 3;
bool ExportPush = 4;
bool ExportLoad = 5;
// TODO: we should remove Linked from the controllerapi, it's only used to
// produce a single warning. To allow this, we need to move the default
// export detection out from the controller server, as well as load the
// driver on the controller client.
bool Linked = 6;
} }
message ExportEntry { message ExportEntry {

@ -11,52 +11,6 @@ import (
// ResolveOptionPaths resolves all paths contained in BuildOptions // ResolveOptionPaths resolves all paths contained in BuildOptions
// and replaces them to absolute paths. // and replaces them to absolute paths.
func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) { func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) {
localContext := false
if options.ContextPath != "" && options.ContextPath != "-" {
if !isRemoteURL(options.ContextPath) {
localContext = true
options.ContextPath, err = filepath.Abs(options.ContextPath)
if err != nil {
return nil, err
}
}
}
if options.DockerfileName != "" && options.DockerfileName != "-" {
if localContext && !urlutil.IsURL(options.DockerfileName) {
options.DockerfileName, err = filepath.Abs(options.DockerfileName)
if err != nil {
return nil, err
}
}
}
var contexts map[string]string
for k, v := range options.NamedContexts {
if isRemoteURL(v) || strings.HasPrefix(v, "docker-image://") {
// url prefix, this is a remote path
} else if strings.HasPrefix(v, "oci-layout://") {
// oci layout prefix, this is a local path
p := strings.TrimPrefix(v, "oci-layout://")
p, err = filepath.Abs(p)
if err != nil {
return nil, err
}
v = "oci-layout://" + p
} else {
// no prefix, assume local path
v, err = filepath.Abs(v)
if err != nil {
return nil, err
}
}
if contexts == nil {
contexts = make(map[string]string)
}
contexts[k] = v
}
options.NamedContexts = contexts
var cacheFrom []*CacheOptionsEntry var cacheFrom []*CacheOptionsEntry
for _, co := range options.CacheFrom { for _, co := range options.CacheFrom {
switch co.Type { switch co.Type {
@ -161,6 +115,59 @@ func ResolveOptionPaths(options *BuildOptions) (_ *BuildOptions, err error) {
} }
options.SSH = ssh options.SSH = ssh
if options.Inputs == nil {
return options, nil
}
localContext := false
if options.Inputs.ContextPath != "" && options.Inputs.ContextPath != "-" {
if !isRemoteURL(options.Inputs.ContextPath) {
localContext = true
options.Inputs.ContextPath, err = filepath.Abs(options.Inputs.ContextPath)
if err != nil {
return nil, err
}
}
}
if options.Inputs.DockerfileName != "" && options.Inputs.DockerfileName != "-" {
if localContext && !urlutil.IsURL(options.Inputs.DockerfileName) {
options.Inputs.DockerfileName, err = filepath.Abs(options.Inputs.DockerfileName)
if err != nil {
return nil, err
}
}
}
var contexts map[string]*NamedContext
for k, v := range options.Inputs.NamedContexts {
v := *v
if v.Definition != nil {
// definition, no path
} else if urlutil.IsGitURL(v.Path) || urlutil.IsURL(v.Path) || strings.HasPrefix(v.Path, "docker-image://") {
// url prefix, this is a remote path
} else if strings.HasPrefix(v.Path, "oci-layout://") {
// oci layout prefix, this is a local path
p := strings.TrimPrefix(v.Path, "oci-layout://")
p, err = filepath.Abs(p)
if err != nil {
return nil, err
}
v.Path = "oci-layout://" + p
} else {
// no prefix, assume local path
v.Path, err = filepath.Abs(v.Path)
if err != nil {
return nil, err
}
}
if contexts == nil {
contexts = make(map[string]*NamedContext)
}
contexts[k] = &v
}
options.Inputs.NamedContexts = contexts
return options, nil return options, nil
} }

@ -20,46 +20,86 @@ func TestResolvePaths(t *testing.T) {
want BuildOptions want BuildOptions
}{ }{
{ {
name: "contextpath", name: "contextpath",
options: BuildOptions{ContextPath: "test"}, options: BuildOptions{
want: BuildOptions{ContextPath: filepath.Join(tmpwd, "test")}, Inputs: &Inputs{ContextPath: "test"},
},
want: BuildOptions{
Inputs: &Inputs{ContextPath: filepath.Join(tmpwd, "test")},
},
}, },
{ {
name: "contextpath-cwd", name: "contextpath-cwd",
options: BuildOptions{ContextPath: "."}, options: BuildOptions{
want: BuildOptions{ContextPath: tmpwd}, Inputs: &Inputs{ContextPath: "."},
},
want: BuildOptions{
Inputs: &Inputs{ContextPath: tmpwd},
},
}, },
{ {
name: "contextpath-dash", name: "contextpath-dash",
options: BuildOptions{ContextPath: "-"}, options: BuildOptions{
want: BuildOptions{ContextPath: "-"}, Inputs: &Inputs{ContextPath: "-"},
},
want: BuildOptions{
Inputs: &Inputs{ContextPath: "-"},
},
}, },
{ {
name: "contextpath-ssh", name: "contextpath-ssh",
options: BuildOptions{ContextPath: "git@github.com:docker/buildx.git"}, options: BuildOptions{
want: BuildOptions{ContextPath: "git@github.com:docker/buildx.git"}, Inputs: &Inputs{ContextPath: "git@github.com:docker/buildx.git"},
},
want: BuildOptions{
Inputs: &Inputs{ContextPath: "git@github.com:docker/buildx.git"},
},
}, },
{ {
name: "dockerfilename", name: "dockerfilename",
options: BuildOptions{DockerfileName: "test", ContextPath: "."}, options: BuildOptions{
want: BuildOptions{DockerfileName: filepath.Join(tmpwd, "test"), ContextPath: tmpwd}, Inputs: &Inputs{DockerfileName: "test", ContextPath: "."},
},
want: BuildOptions{
Inputs: &Inputs{DockerfileName: filepath.Join(tmpwd, "test"), ContextPath: tmpwd},
},
}, },
{ {
name: "dockerfilename-dash", name: "dockerfilename-dash",
options: BuildOptions{DockerfileName: "-", ContextPath: "."}, options: BuildOptions{
want: BuildOptions{DockerfileName: "-", ContextPath: tmpwd}, Inputs: &Inputs{DockerfileName: "-", ContextPath: "."},
},
want: BuildOptions{
Inputs: &Inputs{DockerfileName: "-", ContextPath: tmpwd},
},
}, },
{ {
name: "dockerfilename-remote", name: "dockerfilename-remote",
options: BuildOptions{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, options: BuildOptions{
want: BuildOptions{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"}, Inputs: &Inputs{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"},
},
want: BuildOptions{
Inputs: &Inputs{DockerfileName: "test", ContextPath: "git@github.com:docker/buildx.git"},
},
}, },
{ {
name: "contexts", name: "contexts",
options: BuildOptions{NamedContexts: map[string]string{"a": "test1", "b": "test2", options: BuildOptions{
"alpine": "docker-image://alpine@sha256:0123456789", "project": "https://github.com/myuser/project.git"}}, Inputs: &Inputs{NamedContexts: map[string]*NamedContext{
want: BuildOptions{NamedContexts: map[string]string{"a": filepath.Join(tmpwd, "test1"), "b": filepath.Join(tmpwd, "test2"), "a": {Path: "test1"},
"alpine": "docker-image://alpine@sha256:0123456789", "project": "https://github.com/myuser/project.git"}}, "b": {Path: "test2"},
"alpine": {Path: "docker-image://alpine@sha256:0123456789"},
"project": {Path: "https://github.com/myuser/project.git"},
},
}},
want: BuildOptions{
Inputs: &Inputs{NamedContexts: map[string]*NamedContext{
"a": {Path: filepath.Join(tmpwd, "test1")},
"b": {Path: filepath.Join(tmpwd, "test2")},
"alpine": {Path: "docker-image://alpine@sha256:0123456789"},
"project": {Path: "https://github.com/myuser/project.git"},
},
}},
}, },
{ {
name: "cache-from", name: "cache-from",

@ -3,15 +3,16 @@ package buildflags
import ( import (
"strings" "strings"
controllerapi "github.com/docker/buildx/controller/pb"
"github.com/docker/distribution/reference" "github.com/docker/distribution/reference"
"github.com/pkg/errors" "github.com/pkg/errors"
) )
func ParseContextNames(values []string) (map[string]string, error) { func ParseContextNames(values []string) (map[string]*controllerapi.NamedContext, error) {
if len(values) == 0 { if len(values) == 0 {
return nil, nil return nil, nil
} }
result := make(map[string]string, len(values)) result := make(map[string]*controllerapi.NamedContext, len(values))
for _, value := range values { for _, value := range values {
kv := strings.SplitN(value, "=", 2) kv := strings.SplitN(value, "=", 2)
if len(kv) != 2 { if len(kv) != 2 {
@ -22,7 +23,7 @@ func ParseContextNames(values []string) (map[string]string, error) {
return nil, errors.Wrapf(err, "invalid context name %s", kv[0]) return nil, errors.Wrapf(err, "invalid context name %s", kv[0])
} }
name := strings.TrimSuffix(reference.FamiliarString(named), ":latest") name := strings.TrimSuffix(reference.FamiliarString(named), ":latest")
result[name] = kv[1] result[name] = &controllerapi.NamedContext{Path: kv[1]}
} }
return result, nil return result, nil
} }

Loading…
Cancel
Save