From 8e5e5a563d7e211f44f199acc780083f792ab524 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Wed, 30 Nov 2022 10:36:27 +0100 Subject: [PATCH] vendor: github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65 - drops the replace-rule for github.com/aws/aws-sdk-go-v2/config (as it no longer was replacing anything) - drops the replace-rules for docker/cli and docker/docker (at least as long as we continue using tagged releases) - removes the github.com/docker/docker/pkg/stringid package (which was redundant) full diff: https://github.com/moby/buildkit/compare/9624ab4710dd..5993b526de65dc62e70978c90e3dd6086b1db6e7 Signed-off-by: Sebastiaan van Stijn --- go.mod | 11 +-- go.sum | 16 ++-- .../containerd/containerd/leases/lease.go | 9 +- .../containerd/containerd/version/version.go | 2 +- vendor/github.com/docker/cli/AUTHORS | 21 ++++- vendor/github.com/docker/cli/cli/cobra.go | 10 ++- .../github.com/docker/cli/cli/command/cli.go | 89 +++++++++++++------ .../docker/cli/cli/command/cli_options.go | 9 ++ .../cli/cli/context/store/metadatastore.go | 4 +- vendor/github.com/docker/docker/AUTHORS | 45 +++++----- .../docker/docker/client/image_list.go | 3 + .../docker/docker/pkg/stringid/README.md | 1 - .../docker/docker/pkg/stringid/stringid.go | 63 ------------- .../docker/docker/registry/session.go | 3 - .../buildkit/solver/result/attestation.go | 12 +++ .../util/appdefaults/appdefaults_unix.go | 8 +- .../util/appdefaults/appdefaults_windows.go | 6 +- vendor/modules.txt | 14 ++- 18 files changed, 172 insertions(+), 154 deletions(-) delete mode 100644 vendor/github.com/docker/docker/pkg/stringid/README.md delete mode 100644 vendor/github.com/docker/docker/pkg/stringid/stringid.go diff --git a/go.mod b/go.mod index a09631bf..367f1569 100644 --- a/go.mod +++ b/go.mod @@ -6,17 +6,17 @@ require ( github.com/aws/aws-sdk-go-v2/config v1.15.5 github.com/compose-spec/compose-go v1.6.0 github.com/containerd/console v1.0.3 - github.com/containerd/containerd v1.6.10 - github.com/docker/cli v20.10.21+incompatible // v22.06.x - see "replace" for the actual version + github.com/containerd/containerd v1.6.11 + github.com/docker/cli v23.0.0-beta.1+incompatible github.com/docker/cli-docs-tool v0.5.0 github.com/docker/distribution v2.8.1+incompatible - github.com/docker/docker v20.10.21+incompatible // v22.06.x - see "replace" for the actual version + github.com/docker/docker v23.0.0-beta.1+incompatible github.com/docker/go-units v0.5.0 github.com/gofrs/flock v0.8.1 github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 github.com/hashicorp/go-cty-funcs v0.0.0-20200930094925-2721b1e36840 github.com/hashicorp/hcl/v2 v2.8.2 - github.com/moby/buildkit v0.11.0-rc1.0.20221205150952-9624ab4710dd + github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65 github.com/morikuni/aec v1.0.0 github.com/opencontainers/go-digest v1.0.0 github.com/opencontainers/image-spec v1.0.3-0.20220303224323-02efb9a75ee1 @@ -170,9 +170,6 @@ require ( ) replace ( - github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.15.5 // same as buildkit - github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221124184145-c0fa00e6142d+incompatible // v23.0.0-dev - github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221124164242-a913b5ad7ef1+incompatible // 22.06 branch (v23.0.0-dev) k8s.io/api => k8s.io/api v0.22.4 k8s.io/apimachinery => k8s.io/apimachinery v0.22.4 k8s.io/client-go => k8s.io/client-go v0.22.4 diff --git a/go.sum b/go.sum index b96c2d19..d00bdf83 100644 --- a/go.sum +++ b/go.sum @@ -140,8 +140,8 @@ github.com/compose-spec/compose-go v1.6.0/go.mod h1:os+Ulh2jlZxY1XT1hbciERadjSUU github.com/containerd/cgroups v1.0.4 h1:jN/mbWBEaz+T1pi5OFtnkQ+8qnmEbAr1Oo1FRm5B0dA= github.com/containerd/console v1.0.3 h1:lIr7SlA5PxZyMV30bDW0MGbiOPXwc63yRuCP0ARubLw= github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= -github.com/containerd/containerd v1.6.10 h1:8aiav7I2ZyQLbTlNMcBXyAU1FtFvp6VuyuW13qSd6Hk= -github.com/containerd/containerd v1.6.10/go.mod h1:CVqfxdJ95PDgORwA219AwwLrREZgrTFybXu2HfMKRG0= +github.com/containerd/containerd v1.6.11 h1:uIn0uKrRhETIPyAb0lz6WY2xhYBObUOF1bBi5rqZ5x4= +github.com/containerd/containerd v1.6.11/go.mod h1:K4Bw7gjgh4TnkmQY+py/PYQGp4e7xgnHAeg87VeWb3A= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/containerd/fifo v1.0.0 h1:6PirWBr9/L7GDamKr+XM0IeUFXu5mf3M/BPpH9gaLBU= @@ -163,14 +163,14 @@ github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb h1:oCCuuU3kMO3sjZH/p7LamvQNW9SWoT4yQuMGcdSxGAE= github.com/distribution/distribution/v3 v3.0.0-20220725133111-4bf3547399eb/go.mod h1:28YO/VJk9/64+sTGNuYaBjWxrXTPrj0C0XmgTIOjxX4= -github.com/docker/cli v20.10.3-0.20221124184145-c0fa00e6142d+incompatible h1:lbfUnsiVxrzdf/p40pjGV/ZJBVI7kClbzy4DVLLydRA= -github.com/docker/cli v20.10.3-0.20221124184145-c0fa00e6142d+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= +github.com/docker/cli v23.0.0-beta.1+incompatible h1:K9CMaN5nHB1eu2f02PURnJhlPhWuFl0s9mL3kildAtE= +github.com/docker/cli v23.0.0-beta.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= github.com/docker/cli-docs-tool v0.5.0 h1:EjGwI6EyB7YemHCC7R8mwXszJTbuq0T0pFuDC5bMhcE= github.com/docker/cli-docs-tool v0.5.0/go.mod h1:zMjqTFCU361PRh8apiXzeAZ1Q/xupbIwTusYpzCXS/o= github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v20.10.3-0.20221124164242-a913b5ad7ef1+incompatible h1:DIeHTXiwBnyvC8H38QHJCtU/pyEEAtUHwZgAaDPX2wI= -github.com/docker/docker v20.10.3-0.20221124164242-a913b5ad7ef1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= +github.com/docker/docker v23.0.0-beta.1+incompatible h1:0Xv+AFPWxTbmohdLK57pYRPmefCKthtfRF/qQwXHolg= +github.com/docker/docker v23.0.0-beta.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0= @@ -401,8 +401,8 @@ github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZX github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/moby/buildkit v0.11.0-rc1.0.20221205150952-9624ab4710dd h1:Ap+50rl9e9fkIA02J2Oyy1woX5rXjEeKVSZGznQ4BQI= -github.com/moby/buildkit v0.11.0-rc1.0.20221205150952-9624ab4710dd/go.mod h1:Bg4hb4FoSQSIht5FyQ6RLri6jEOkZma5Aynsq309UY8= +github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65 h1:DqEgo1ewB/QBoPfXg/e/8iNEXABHnt7uOeu1VKxX6S0= +github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65/go.mod h1:ToPrcDw4Z4+tyuk+CN+WQ0/tCWcn/ceyXtTKXXe9VP4= github.com/moby/locker v1.0.1 h1:fOXqR41zeveg4fFODix+1Ch4mj/gT0NE1XJbp/epuBg= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= github.com/moby/patternmatcher v0.5.0 h1:YCZgJOeULcxLw1Q+sVR636pmS7sPEn1Qo2iAN6M7DBo= diff --git a/vendor/github.com/containerd/containerd/leases/lease.go b/vendor/github.com/containerd/containerd/leases/lease.go index 058d0655..fc0ca349 100644 --- a/vendor/github.com/containerd/containerd/leases/lease.go +++ b/vendor/github.com/containerd/containerd/leases/lease.go @@ -65,10 +65,15 @@ func SynchronousDelete(ctx context.Context, o *DeleteOptions) error { return nil } -// WithLabels sets labels on a lease +// WithLabels merges labels on a lease func WithLabels(labels map[string]string) Opt { return func(l *Lease) error { - l.Labels = labels + if l.Labels == nil { + l.Labels = map[string]string{} + } + for k, v := range labels { + l.Labels[k] = v + } return nil } } diff --git a/vendor/github.com/containerd/containerd/version/version.go b/vendor/github.com/containerd/containerd/version/version.go index cf804ade..476c6c4b 100644 --- a/vendor/github.com/containerd/containerd/version/version.go +++ b/vendor/github.com/containerd/containerd/version/version.go @@ -23,7 +23,7 @@ var ( Package = "github.com/containerd/containerd" // Version holds the complete version number. Filled in at linking time. - Version = "1.6.10+unknown" + Version = "1.6.11+unknown" // Revision is filled with the VCS (e.g. git) revision being used to build // the program at linking time. diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS index b7bf0532..483743c9 100644 --- a/vendor/github.com/docker/cli/AUTHORS +++ b/vendor/github.com/docker/cli/AUTHORS @@ -1,5 +1,6 @@ -# This file lists all individuals having contributed content to the repository. -# For how it is generated, see `scripts/docs/generate-authors.sh`. +# File @generated by scripts/docs/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See scripts/docs/generate-authors.sh to make modifications. Aanand Prasad Aaron L. Xu @@ -24,6 +25,7 @@ Akihiro Suda Akim Demaille Alan Thompson Albert Callarisa +Alberto Roura Albin Kerouanton Aleksa Sarai Aleksander Piotrowski @@ -37,6 +39,7 @@ Alexander Morozov Alexander Ryabov Alexandre González Alexey Igrychev +Alexis Couvreur Alfred Landrum Alicia Lauerman Allen Sun @@ -82,6 +85,7 @@ Bardia Keyoumarsi Barnaby Gray Bastiaan Bakker BastianHofmann +Ben Bodenmiller Ben Bonnefoy Ben Creasy Ben Firshman @@ -93,6 +97,7 @@ Bhumika Bayani Bill Wang Bin Liu Bingshen Wang +Bishal Das Boaz Shuster Bogdan Anton Boris Pruessmann @@ -105,6 +110,7 @@ Bret Fisher Brian (bex) Exelbierd Brian Goff Brian Wieder +Bruno Sousa Bryan Bess Bryan Boreham Bryan Murphy @@ -192,6 +198,7 @@ David Calavera David Cramer David Dooling David Gageot +David Karlsson David Lechner David Scott David Sheets @@ -251,6 +258,7 @@ Evelyn Xu Everett Toews Fabio Falci Fabrizio Soppelsa +Felix Geyer Felix Hupfeld Felix Rabe fezzik1620 @@ -275,6 +283,7 @@ George MacRorie George Xie Gianluca Borello Gildas Cuisinier +Gio d'Amelio Gleb Stsenov Goksu Toprak Gou Rao @@ -332,6 +341,7 @@ Jan-Jaap Driessen Jana Radhakrishnan Jared Hocutt Jasmine Hegman +Jason Hall Jason Heiss Jason Plum Jay Kamat @@ -501,6 +511,7 @@ Mason Fish Mason Malone Mateusz Major Mathieu Champlon +Mathieu Rollet Matt Gucci Matt Robenolt Matteo Orefice @@ -553,6 +564,7 @@ Moysés Borges Mozi <29089388+pzhlkj6612@users.noreply.github.com> Mrunal Patel muicoder +Murukesh Mohanan Muthukumar R Máximo Cuadros Mårten Cassel @@ -568,6 +580,7 @@ Nathan LeClaire Nathan McCauley Neil Peterson Nick Adcock +Nick Santos Nico Stapelbroek Nicola Kabar Nicolas Borboën @@ -666,6 +679,7 @@ Sainath Grandhi Sakeven Jiang Sally O'Malley Sam Neirinck +Sam Thibault Samarth Shah Sambuddha Basu Sami Tabet @@ -701,7 +715,8 @@ Slava Semushin Solomon Hykes Song Gao Spencer Brown -squeegels <1674195+squeegels@users.noreply.github.com> +Spring Lee +squeegels Srini Brahmaroutu Stefan S. Stefan Scherer diff --git a/vendor/github.com/docker/cli/cli/cobra.go b/vendor/github.com/docker/cli/cli/cobra.go index 7cf7e810..dbb6caa8 100644 --- a/vendor/github.com/docker/cli/cli/cobra.go +++ b/vendor/github.com/docker/cli/cli/cobra.go @@ -61,7 +61,7 @@ func setupCommonRootCommand(rootCmd *cobra.Command) (*cliflags.ClientOptions, *p rootCmd.PersistentFlags().MarkShorthandDeprecated("help", "please use --help") rootCmd.PersistentFlags().Lookup("help").Hidden = true - rootCmd.Annotations = map[string]string{"additionalHelp": "To get more help with docker, check out our guides at https://docs.docker.com/go/guides/"} + rootCmd.Annotations = map[string]string{"additionalHelp": "For more help on how to use Docker, head to https://docs.docker.com/go/guides/"} // Configure registry.CertsDir() when running in rootless-mode if os.Getenv("ROOTLESSKIT_STATE_DIR") != "" { @@ -116,7 +116,13 @@ type TopLevelCommand struct { // NewTopLevelCommand returns a new TopLevelCommand object func NewTopLevelCommand(cmd *cobra.Command, dockerCli *command.DockerCli, opts *cliflags.ClientOptions, flags *pflag.FlagSet) *TopLevelCommand { - return &TopLevelCommand{cmd, dockerCli, opts, flags, os.Args[1:]} + return &TopLevelCommand{ + cmd: cmd, + dockerCli: dockerCli, + opts: opts, + flags: flags, + args: os.Args[1:], + } } // SetArgs sets the args (default os.Args[:1] used to invoke the command diff --git a/vendor/github.com/docker/cli/cli/command/cli.go b/vendor/github.com/docker/cli/cli/command/cli.go index f27d43a5..b4fc1514 100644 --- a/vendor/github.com/docker/cli/cli/command/cli.go +++ b/vendor/github.com/docker/cli/cli/command/cli.go @@ -2,12 +2,14 @@ package command import ( "context" + "fmt" "io" "os" "path/filepath" "runtime" "strconv" "strings" + "sync" "time" "github.com/docker/cli/cli/config" @@ -55,6 +57,7 @@ type Cli interface { ServerInfo() ServerInfo NotaryClient(imgRefAndAuth trust.ImageRefAndAuth, actions []string) (notaryclient.Repository, error) DefaultVersion() string + CurrentVersion() string ManifestStore() manifeststore.Store RegistryClient(bool) registryclient.RegistryClient ContentTrustEnabled() bool @@ -68,6 +71,7 @@ type Cli interface { // Instances of the client can be returned from NewDockerCli. type DockerCli struct { configFile *configfile.ConfigFile + options *cliflags.ClientOptions in *streams.In out *streams.Out err io.Writer @@ -76,6 +80,8 @@ type DockerCli struct { contentTrust bool contextStore store.Store currentContext string + init sync.Once + initErr error dockerEndpoint docker.Endpoint contextStoreConfig store.Config initTimeout time.Duration @@ -86,8 +92,22 @@ func (cli *DockerCli) DefaultVersion() string { return api.DefaultVersion } +// CurrentVersion returns the API version currently negotiated, or the default +// version otherwise. +func (cli *DockerCli) CurrentVersion() string { + _ = cli.initialize() + if cli.client == nil { + return api.DefaultVersion + } + return cli.client.ClientVersion() +} + // Client returns the APIClient func (cli *DockerCli) Client() client.APIClient { + if err := cli.initialize(); err != nil { + _, _ = fmt.Fprintf(cli.Err(), "Failed to initialize: %s\n", err) + os.Exit(1) + } return cli.client } @@ -122,20 +142,17 @@ func ShowHelp(err io.Writer) func(*cobra.Command, []string) error { // ConfigFile returns the ConfigFile func (cli *DockerCli) ConfigFile() *configfile.ConfigFile { + // TODO(thaJeztah): when would this happen? Is this only in tests (where cli.Initialize() is not called first?) if cli.configFile == nil { - cli.loadConfigFile() + cli.configFile = config.LoadDefaultConfigFile(cli.err) } return cli.configFile } -func (cli *DockerCli) loadConfigFile() { - cli.configFile = config.LoadDefaultConfigFile(cli.err) -} - // ServerInfo returns the server version details for the host this client is // connected to func (cli *DockerCli) ServerInfo() ServerInfo { - // TODO(thaJeztah) make ServerInfo() lazily load the info (ping only when needed) + _ = cli.initialize() return cli.serverInfo } @@ -195,8 +212,6 @@ func WithInitializeClient(makeClient func(dockerCli *DockerCli) (client.APIClien // Initialize the dockerCli runs initialization that must happen after command // line flags are parsed. func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...InitializeOpt) error { - var err error - for _, o := range ops { if err := o(cli); err != nil { return err @@ -215,28 +230,15 @@ func (cli *DockerCli) Initialize(opts *cliflags.ClientOptions, ops ...Initialize return errors.New("conflicting options: either specify --host or --context, not both") } - cli.loadConfigFile() - - baseContextStore := store.New(config.ContextStoreDir(), cli.contextStoreConfig) + cli.options = opts + cli.configFile = config.LoadDefaultConfigFile(cli.err) + cli.currentContext = resolveContextName(cli.options, cli.configFile) cli.contextStore = &ContextStoreWithDefault{ - Store: baseContextStore, + Store: store.New(config.ContextStoreDir(), cli.contextStoreConfig), Resolver: func() (*DefaultContext, error) { - return ResolveDefaultContext(opts, cli.contextStoreConfig) + return ResolveDefaultContext(cli.options, cli.contextStoreConfig) }, } - cli.currentContext = resolveContextName(opts, cli.configFile) - cli.dockerEndpoint, err = resolveDockerEndpoint(cli.contextStore, cli.currentContext) - if err != nil { - return errors.Wrap(err, "unable to resolve docker endpoint") - } - - if cli.client == nil { - cli.client, err = newAPIClientFromEndpoint(cli.dockerEndpoint, cli.configFile) - if err != nil { - return err - } - } - cli.initializeFromClient() return nil } @@ -275,6 +277,9 @@ func newAPIClientFromEndpoint(ep docker.Endpoint, configFile *configfile.ConfigF } func resolveDockerEndpoint(s store.Reader, contextName string) (docker.Endpoint, error) { + if s == nil { + return docker.Endpoint{}, fmt.Errorf("no context store initialized") + } ctxMeta, err := s.GetMetadata(contextName) if err != nil { return docker.Endpoint{}, err @@ -324,7 +329,7 @@ func (cli *DockerCli) getInitTimeout() time.Duration { func (cli *DockerCli) initializeFromClient() { ctx := context.Background() - if !strings.HasPrefix(cli.DockerEndpoint().Host, "ssh://") { + if !strings.HasPrefix(cli.dockerEndpoint.Host, "ssh://") { // @FIXME context.WithTimeout doesn't work with connhelper / ssh connections // time="2020-04-10T10:16:26Z" level=warning msg="commandConn.CloseWrite: commandconn: failed to wait: signal: killed" var cancel func() @@ -421,9 +426,39 @@ func resolveContextName(opts *cliflags.ClientOptions, config *configfile.ConfigF // DockerEndpoint returns the current docker endpoint func (cli *DockerCli) DockerEndpoint() docker.Endpoint { + if err := cli.initialize(); err != nil { + // Note that we're not terminating here, as this function may be used + // in cases where we're able to continue. + _, _ = fmt.Fprintf(cli.Err(), "%v\n", cli.initErr) + } return cli.dockerEndpoint } +func (cli *DockerCli) getDockerEndPoint() (ep docker.Endpoint, err error) { + cn := cli.CurrentContext() + if cn == DefaultContextName { + return resolveDefaultDockerEndpoint(cli.options) + } + return resolveDockerEndpoint(cli.contextStore, cn) +} + +func (cli *DockerCli) initialize() error { + cli.init.Do(func() { + cli.dockerEndpoint, cli.initErr = cli.getDockerEndPoint() + if cli.initErr != nil { + cli.initErr = errors.Wrap(cli.initErr, "unable to resolve docker endpoint") + return + } + if cli.client == nil { + if cli.client, cli.initErr = newAPIClientFromEndpoint(cli.dockerEndpoint, cli.configFile); cli.initErr != nil { + return + } + } + cli.initializeFromClient() + }) + return cli.initErr +} + // Apply all the operation on the cli func (cli *DockerCli) Apply(ops ...DockerCliOption) error { for _, op := range ops { diff --git a/vendor/github.com/docker/cli/cli/command/cli_options.go b/vendor/github.com/docker/cli/cli/command/cli_options.go index 535a6d53..d714947c 100644 --- a/vendor/github.com/docker/cli/cli/command/cli_options.go +++ b/vendor/github.com/docker/cli/cli/command/cli_options.go @@ -6,6 +6,7 @@ import ( "strconv" "github.com/docker/cli/cli/streams" + "github.com/docker/docker/client" "github.com/moby/term" ) @@ -86,3 +87,11 @@ func WithDefaultContextStoreConfig() DockerCliOption { return nil } } + +// WithAPIClient configures the cli to use the given API client. +func WithAPIClient(c client.APIClient) DockerCliOption { + return func(cli *DockerCli) error { + cli.client = c + return nil + } +} diff --git a/vendor/github.com/docker/cli/cli/context/store/metadatastore.go b/vendor/github.com/docker/cli/cli/context/store/metadatastore.go index fa61c7aa..ba3ea6c0 100644 --- a/vendor/github.com/docker/cli/cli/context/store/metadatastore.go +++ b/vendor/github.com/docker/cli/cli/context/store/metadatastore.go @@ -59,7 +59,7 @@ func parseTypedOrMap(payload []byte, getter TypeGetter) (interface{}, error) { func (s *metadataStore) get(name string) (Metadata, error) { m, err := s.getByID(contextdirOf(name)) if err != nil { - return m, errors.Wrapf(err, "load context %q", name) + return m, errors.Wrapf(err, "context %q", name) } return m, nil } @@ -68,7 +68,7 @@ func (s *metadataStore) getByID(id contextdir) (Metadata, error) { bytes, err := os.ReadFile(filepath.Join(s.contextDir(id), metaFile)) if err != nil { if errors.Is(err, os.ErrNotExist) { - return Metadata{}, errdefs.NotFound(errors.Wrap(err, "context does not exist")) + return Metadata{}, errdefs.NotFound(errors.Wrap(err, "context not found")) } return Metadata{}, err } diff --git a/vendor/github.com/docker/docker/AUTHORS b/vendor/github.com/docker/docker/AUTHORS index f4238eca..0728bfe1 100644 --- a/vendor/github.com/docker/docker/AUTHORS +++ b/vendor/github.com/docker/docker/AUTHORS @@ -1,5 +1,6 @@ -# This file lists all individuals having contributed content to the repository. -# For how it is generated, see `hack/generate-authors.sh`. +# File @generated by hack/generate-authors.sh. DO NOT EDIT. +# This file lists all contributors to the repository. +# See hack/generate-authors.sh to make modifications. Aanand Prasad Aaron Davidson @@ -9,7 +10,6 @@ Aaron Huslage Aaron L. Xu Aaron Lehmann Aaron Welch -Aaron.L.Xu Abel Muiño Abhijeet Kasurde Abhinandan Prativadi @@ -17,6 +17,7 @@ Abhinav Ajgaonkar Abhishek Chanda Abhishek Sharma Abin Shahab +Abirdcfly Ada Mancini Adam Avilla Adam Dobrawy @@ -161,7 +162,6 @@ Andrey Kolomentsev Andrey Petrov Andrey Stolbovsky André Martins -andy Andy Chambers andy diller Andy Goldstein @@ -170,6 +170,7 @@ Andy Lindeman Andy Rothfusz Andy Smith Andy Wilson +Andy Zhang Anes Hasicic Angel Velazquez Anil Belur @@ -209,6 +210,7 @@ Artur Meyster Arun Gupta Asad Saeeduddin Asbjørn Enge +Austin Vazquez averagehuman Avi Das Avi Kivity @@ -222,6 +224,7 @@ Barnaby Gray Barry Allard Bartłomiej Piotrowski Bastiaan Bakker +Bastien Pascard bdevloed Bearice Ren Ben Bonnefoy @@ -229,6 +232,7 @@ Ben Firshman Ben Golub Ben Gould Ben Hall +Ben Langfeld Ben Sargent Ben Severson Ben Toews @@ -258,6 +262,7 @@ Bjorn Neergaard Blake Geno Boaz Shuster bobby abbott +Bojun Zhu Boqin Qin Boris Pruessmann Boshi Lian @@ -339,6 +344,7 @@ Charlie Drage Charlie Lewis Chase Bolt ChaYoung You +Chee Hau Lim Chen Chao Chen Chuanliang Chen Hanxiao @@ -545,7 +551,6 @@ Derek Ch Derek McGowan Deric Crago Deshi Xiao -devmeyster Devon Estes Devvyn Murphy Dharmit Shah @@ -650,6 +655,7 @@ Erik Dubbelboer Erik Hollensbe Erik Inge Bolsø Erik Kristensen +Erik Sipsma Erik St. Martin Erik Weathers Erno Hopearuoho @@ -707,6 +713,7 @@ Fengtu Wang Ferenc Szabo Fernando Fero Volar +Feroz Salam Ferran Rodenas Filipe Brandenburger Filipe Oliveira @@ -822,7 +829,7 @@ Hamish Hutchings Hannes Ljungberg Hans Kristian Flaatten Hans Rødtang -Hao Shu Wei +Hao Shu Wei Hao Zhang <21521210@zju.edu.cn> Harald Albers Harald Niesche @@ -861,10 +868,9 @@ Hui Kang Hunter Blanks huqun Huu Nguyen -hyeongkyu.lee +Hyeongkyu Lee Hyzhou Zhy Iago López Galeiras -Ian Babrou Ian Bishop Ian Bull Ian Calvert @@ -881,6 +887,7 @@ Igor Dolzhikov Igor Karpovich Iliana Weller Ilkka Laukkanen +Illo Abdulrahim Ilya Dmitrichenko Ilya Gusev Ilya Khlopotov @@ -931,6 +938,7 @@ Jamie Hannaford Jamshid Afshar Jan Breig Jan Chren +Jan Götte Jan Keromnes Jan Koprowski Jan Pazdziora @@ -943,7 +951,6 @@ Januar Wayong Jared Biel Jared Hocutt Jaroslaw Zabiello -jaseg Jasmine Hegman Jason A. Donenfeld Jason Divock @@ -1214,7 +1221,6 @@ Kris-Mikael Krister Kristian Haugene Kristina Zabunova Krystian Wojcicki -Kun Zhang Kunal Kushwaha Kunal Tyagi Kyle Conroy @@ -1242,7 +1248,6 @@ Leandro Siqueira Lee Calcote Lee Chao <932819864@qq.com> Lee, Meng-Han -leeplay Lei Gong Lei Jitang Leiiwang @@ -1269,7 +1274,6 @@ Lifubang Lihua Tang Lily Guo limeidan -limsy Lin Lu LingFaKe Linus Heckemann @@ -1299,6 +1303,7 @@ Lucas Chi Lucas Molas Lucas Silvestre Luciano Mores +Luis Henrique Mulinari Luis Martínez de Bartolomé Izquierdo Luiz Svoboda Lukas Heeren @@ -1347,6 +1352,7 @@ Marius Gundersen Marius Sturm Marius Voila Mark Allen +Mark Feit Mark Jeromin Mark McGranaghan Mark McKinstry @@ -1362,6 +1368,7 @@ Markus Fix Markus Kortlang Martijn Dwars Martijn van Oosterhout +Martin Braun Martin Dojcak Martin Honermeyer Martin Kelly @@ -1678,6 +1685,7 @@ Petr Švihlík Petros Angelatos Phil Phil Estes +Phil Sphicas Phil Spitler Philip Alexander Etling Philip Monroe @@ -1749,7 +1757,6 @@ Ricardo N Feliciano Rich Horwood Rich Moyse Rich Seymour -Richard Richard Burnison Richard Harvey Richard Mathie @@ -1848,7 +1855,6 @@ Ryo Nakao Ryoga Saito Rémy Greinhofer s. rannou -s00318865 Sabin Basyal Sachin Joshi Sagar Hani @@ -1938,7 +1944,6 @@ Shourya Sarcar Shu-Wai Chow shuai-z Shukui Yang -Shuwei Hao Sian Lerk Lau Siarhei Rasiukevich Sidhartha Mani @@ -1946,7 +1951,6 @@ sidharthamani Silas Sewell Silvan Jegen Simão Reis -Simei He Simon Barendse Simon Eskildsen Simon Ferquel @@ -2022,7 +2026,7 @@ Sébastien Stormacq Sören Tempel Tabakhase Tadej Janež -TAGOMORI Satoshi +Takuto Sato tang0th Tangi Colin Tatsuki Sugiura @@ -2035,7 +2039,6 @@ Tejaswini Duggaraju Tejesh Mehta Terry Chu terryding77 <550147740@qq.com> -tgic Thatcher Peskens theadactyl Thell 'Bo' Fowler @@ -2059,6 +2062,7 @@ Thomas Swift Thomas Tanaka Thomas Texier Ti Zhou +Tiago Seabra Tianon Gravi Tianyi Wang Tibor Vass @@ -2197,7 +2201,6 @@ VladimirAus Vladislav Kolesnikov Vlastimil Zeman Vojtech Vitek (V-Teq) -waitingkuo Walter Leibbrandt Walter Stanish Wang Chao @@ -2227,7 +2230,6 @@ Wendel Fleming Wenjun Tang Wenkai Yin wenlxie -Wentao Zhang Wenxuan Zhao Wenyu You <21551128@zju.edu.cn> Wenzhi Liang @@ -2286,6 +2288,7 @@ Yang Bai Yang Li Yang Pengfei yangchenliang +Yann Autissier Yanqiang Miao Yao Zaiyong Yash Murty @@ -2305,6 +2308,7 @@ Yosef Fertel You-Sheng Yang (楊有勝) youcai Youcef YEKHLEF +Youfu Zhang Yu Changchun Yu Chengxia Yu Peng @@ -2357,7 +2361,6 @@ Zou Yu zqh Zuhayr Elahi Zunayed Ali -Álex González Álvaro Lázaro Átila Camurça Alves 尹吉峰 diff --git a/vendor/github.com/docker/docker/client/image_list.go b/vendor/github.com/docker/docker/client/image_list.go index a4d75050..950d5133 100644 --- a/vendor/github.com/docker/docker/client/image_list.go +++ b/vendor/github.com/docker/docker/client/image_list.go @@ -34,6 +34,9 @@ func (cli *Client) ImageList(ctx context.Context, options types.ImageListOptions if options.All { query.Set("all", "1") } + if options.SharedSize && versions.GreaterThanOrEqualTo(cli.version, "1.42") { + query.Set("shared-size", "1") + } serverResp, err := cli.get(ctx, "/images/json", query, nil) defer ensureReaderClosed(serverResp) diff --git a/vendor/github.com/docker/docker/pkg/stringid/README.md b/vendor/github.com/docker/docker/pkg/stringid/README.md deleted file mode 100644 index 37a5098f..00000000 --- a/vendor/github.com/docker/docker/pkg/stringid/README.md +++ /dev/null @@ -1 +0,0 @@ -This package provides helper functions for dealing with string identifiers diff --git a/vendor/github.com/docker/docker/pkg/stringid/stringid.go b/vendor/github.com/docker/docker/pkg/stringid/stringid.go deleted file mode 100644 index 5fe071d6..00000000 --- a/vendor/github.com/docker/docker/pkg/stringid/stringid.go +++ /dev/null @@ -1,63 +0,0 @@ -// Package stringid provides helper functions for dealing with string identifiers -package stringid // import "github.com/docker/docker/pkg/stringid" - -import ( - "crypto/rand" - "encoding/hex" - "fmt" - "regexp" - "strconv" - "strings" -) - -const shortLen = 12 - -var ( - validShortID = regexp.MustCompile("^[a-f0-9]{12}$") - validHex = regexp.MustCompile(`^[a-f0-9]{64}$`) -) - -// IsShortID determines if an arbitrary string *looks like* a short ID. -func IsShortID(id string) bool { - return validShortID.MatchString(id) -} - -// TruncateID returns a shorthand version of a string identifier for convenience. -// A collision with other shorthands is very unlikely, but possible. -// In case of a collision a lookup with TruncIndex.Get() will fail, and the caller -// will need to use a longer prefix, or the full-length Id. -func TruncateID(id string) string { - if i := strings.IndexRune(id, ':'); i >= 0 { - id = id[i+1:] - } - if len(id) > shortLen { - id = id[:shortLen] - } - return id -} - -// GenerateRandomID returns a unique id. -func GenerateRandomID() string { - b := make([]byte, 32) - for { - if _, err := rand.Read(b); err != nil { - panic(err) // This shouldn't happen - } - id := hex.EncodeToString(b) - // if we try to parse the truncated for as an int and we don't have - // an error then the value is all numeric and causes issues when - // used as a hostname. ref #3869 - if _, err := strconv.ParseInt(TruncateID(id), 10, 64); err == nil { - continue - } - return id - } -} - -// ValidateID checks whether an ID string is a valid image ID. -func ValidateID(id string) error { - if ok := validHex.MatchString(id); !ok { - return fmt.Errorf("image ID %q is invalid", id) - } - return nil -} diff --git a/vendor/github.com/docker/docker/registry/session.go b/vendor/github.com/docker/docker/registry/session.go index fd193e1d..6418e2d6 100644 --- a/vendor/github.com/docker/docker/registry/session.go +++ b/vendor/github.com/docker/docker/registry/session.go @@ -16,7 +16,6 @@ import ( "github.com/docker/docker/errdefs" "github.com/docker/docker/pkg/ioutils" "github.com/docker/docker/pkg/jsonmessage" - "github.com/docker/docker/pkg/stringid" "github.com/pkg/errors" "github.com/sirupsen/logrus" ) @@ -25,7 +24,6 @@ import ( type session struct { indexEndpoint *v1Endpoint client *http.Client - id string } type authTransport struct { @@ -180,7 +178,6 @@ func newSession(client *http.Client, endpoint *v1Endpoint) *session { return &session{ client: client, indexEndpoint: endpoint, - id: stringid.GenerateRandomID(), } } diff --git a/vendor/github.com/moby/buildkit/solver/result/attestation.go b/vendor/github.com/moby/buildkit/solver/result/attestation.go index 81e8a09a..e23e88ab 100644 --- a/vendor/github.com/moby/buildkit/solver/result/attestation.go +++ b/vendor/github.com/moby/buildkit/solver/result/attestation.go @@ -5,9 +5,21 @@ import ( digest "github.com/opencontainers/go-digest" ) +const ( + AttestationReasonKey = "reason" + AttestationInlineOnlyKey = "inline-only" +) + +var ( + AttestationReasonSBOM = []byte("sbom") + AttestationReasonProvenance = []byte("provenance") +) + type Attestation struct { Kind pb.AttestationKind + Metadata map[string][]byte + Ref string Path string ContentFunc func() ([]byte, error) diff --git a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_unix.go b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_unix.go index 499e8771..0084280c 100644 --- a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_unix.go +++ b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_unix.go @@ -10,9 +10,11 @@ import ( ) const ( - Address = "unix:///run/buildkit/buildkitd.sock" - Root = "/var/lib/buildkit" - ConfigDir = "/etc/buildkit" + Address = "unix:///run/buildkit/buildkitd.sock" + Root = "/var/lib/buildkit" + ConfigDir = "/etc/buildkit" + DefaultCNIBinDir = "/opt/cni/bin" + DefaultCNIConfigPath = "/etc/buildkit/cni.json" ) // UserAddress typically returns /run/user/$UID/buildkit/buildkitd.sock diff --git a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go index d5d0ca1f..058789e4 100644 --- a/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go +++ b/vendor/github.com/moby/buildkit/util/appdefaults/appdefaults_windows.go @@ -10,8 +10,10 @@ const ( ) var ( - Root = filepath.Join(os.Getenv("ProgramData"), "buildkitd", ".buildstate") - ConfigDir = filepath.Join(os.Getenv("ProgramData"), "buildkitd") + Root = filepath.Join(os.Getenv("ProgramData"), "buildkitd", ".buildstate") + ConfigDir = filepath.Join(os.Getenv("ProgramData"), "buildkitd") + DefaultCNIBinDir = filepath.Join(ConfigDir, "bin") + DefaultCNIConfigPath = filepath.Join(ConfigDir, "cni.json") ) func UserAddress() string { diff --git a/vendor/modules.txt b/vendor/modules.txt index d1bd0d6d..394ab635 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -67,7 +67,7 @@ github.com/aws/aws-sdk-go-v2/internal/sdkio github.com/aws/aws-sdk-go-v2/internal/strings github.com/aws/aws-sdk-go-v2/internal/sync/singleflight github.com/aws/aws-sdk-go-v2/internal/timeconv -# github.com/aws/aws-sdk-go-v2/config v1.15.5 => github.com/aws/aws-sdk-go-v2/config v1.15.5 +# github.com/aws/aws-sdk-go-v2/config v1.15.5 ## explicit; go 1.15 github.com/aws/aws-sdk-go-v2/config # github.com/aws/aws-sdk-go-v2/credentials v1.12.0 @@ -150,7 +150,7 @@ github.com/compose-spec/compose-go/types # github.com/containerd/console v1.0.3 ## explicit; go 1.13 github.com/containerd/console -# github.com/containerd/containerd v1.6.10 +# github.com/containerd/containerd v1.6.11 ## explicit; go 1.17 github.com/containerd/containerd/api/services/content/v1 github.com/containerd/containerd/archive/compression @@ -194,7 +194,7 @@ github.com/davecgh/go-spew/spew ## explicit; go 1.18 github.com/distribution/distribution/v3/digestset github.com/distribution/distribution/v3/reference -# github.com/docker/cli v20.10.21+incompatible => github.com/docker/cli v20.10.3-0.20221124184145-c0fa00e6142d+incompatible +# github.com/docker/cli v23.0.0-beta.1+incompatible ## explicit github.com/docker/cli/cli github.com/docker/cli/cli-plugins/manager @@ -241,7 +241,7 @@ github.com/docker/distribution/registry/client/transport github.com/docker/distribution/registry/storage/cache github.com/docker/distribution/registry/storage/cache/memory github.com/docker/distribution/uuid -# github.com/docker/docker v20.10.21+incompatible => github.com/docker/docker v20.10.3-0.20221124164242-a913b5ad7ef1+incompatible +# github.com/docker/docker v23.0.0-beta.1+incompatible ## explicit github.com/docker/docker/api github.com/docker/docker/api/types @@ -271,7 +271,6 @@ github.com/docker/docker/pkg/longpath github.com/docker/docker/pkg/namesgenerator github.com/docker/docker/pkg/pools github.com/docker/docker/pkg/stdcopy -github.com/docker/docker/pkg/stringid github.com/docker/docker/pkg/system github.com/docker/docker/registry # github.com/docker/docker-credential-helpers v0.7.0 @@ -434,7 +433,7 @@ github.com/mitchellh/go-wordwrap # github.com/mitchellh/mapstructure v1.5.0 ## explicit; go 1.14 github.com/mitchellh/mapstructure -# github.com/moby/buildkit v0.11.0-rc1.0.20221205150952-9624ab4710dd +# github.com/moby/buildkit v0.11.0-rc1.0.20221207183946-5993b526de65 ## explicit; go 1.18 github.com/moby/buildkit/api/services/control github.com/moby/buildkit/api/types @@ -1105,9 +1104,6 @@ sigs.k8s.io/structured-merge-diff/v4/value # sigs.k8s.io/yaml v1.2.0 ## explicit; go 1.12 sigs.k8s.io/yaml -# github.com/aws/aws-sdk-go-v2/config => github.com/aws/aws-sdk-go-v2/config v1.15.5 -# github.com/docker/cli => github.com/docker/cli v20.10.3-0.20221124184145-c0fa00e6142d+incompatible -# github.com/docker/docker => github.com/docker/docker v20.10.3-0.20221124164242-a913b5ad7ef1+incompatible # k8s.io/api => k8s.io/api v0.22.4 # k8s.io/apimachinery => k8s.io/apimachinery v0.22.4 # k8s.io/client-go => k8s.io/client-go v0.22.4