Skip to content

Commit

Permalink
Merge pull request #10387 from hakman/automated-cherry-pick-of-#10193…
Browse files Browse the repository at this point in the history
…-upstream-release-1.19

Automated cherry pick of #10193: Upgrade docker client
  • Loading branch information
k8s-ci-robot authored Dec 8, 2020
2 parents 90a8883 + 1983f5d commit 82eecaa
Show file tree
Hide file tree
Showing 273 changed files with 23,546 additions and 3,333 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ require (
github.com/coreos/etcd v3.3.17+incompatible
github.com/denverdino/aliyungo v0.0.0-20191128015008-acd8035bbb1d
github.com/digitalocean/godo v1.54.0
github.com/docker/engine-api v0.0.0-20160509170047-dea108d3aa0c
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0
github.com/docker/go-connections v0.4.0 // indirect
github.com/docker/spdystream v0.0.0-20181023171402-6480d4af844c // indirect
github.com/fullsailor/pkcs7 v0.0.0-20180422025557-ae226422660e
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,6 @@ github.com/docker/distribution v2.7.1+incompatible h1:a5mlkVzth6W5A4fOsS3D2EO5BU
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0 h1:w3NnFcKR5241cfmQU5ZZAsf0xcpId6mWOupTvJlUX2U=
github.com/docker/docker v0.7.3-0.20190327010347-be7ac8be2ae0/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/engine-api v0.0.0-20160509170047-dea108d3aa0c h1:VLOfMIO6nEbxBmEG5usBUZlNhMQkln36EncqFyopqVg=
github.com/docker/engine-api v0.0.0-20160509170047-dea108d3aa0c/go.mod h1:xtQCpzf4YysNZCVFfIGIm7qfLvYbxtLkEVVfKhTVOvw=
github.com/docker/go-connections v0.3.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
Expand Down Expand Up @@ -682,6 +680,7 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN
github.com/modern-go/reflect2 v1.0.1 h1:9f412s+6RmYXLWZSEzVVgPGK7C2PphHj5RJrvfx9AWI=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/mohae/deepcopy v0.0.0-20170603005431-491d3605edfb/go.mod h1:TaXosZuwdSHYgviHp1DAtfrULt5eUgsSMsZf+YrPgl8=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mozilla/tls-observatory v0.0.0-20180409132520-8791a200eb40/go.mod h1:SrKMQvPiws7F7iqYp8/TX+IhxCYhzr6N/1yb8cwHsGk=
github.com/mrunalp/fileutils v0.0.0-20171103030105-7d4729fb3618/go.mod h1:x8F1gnqOkIEiO4rqoeEEEqQbo7HjGMTvyoq3gej4iT0=
Expand Down Expand Up @@ -726,6 +725,7 @@ github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE=
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
github.com/opencontainers/go-digest v1.0.0-rc1 h1:WzifXhOVOEOuFYOJAW6aQqW0TooG2iki3E3Ii+WN7gQ=
github.com/opencontainers/go-digest v1.0.0-rc1/go.mod h1:cMLVZDEM3+U2I4VmLI6N8jQYUd2OVphdqWwCJHrFt2s=
github.com/opencontainers/image-spec v1.0.1 h1:JMemWkRwHx4Zj+fVxWoMCFm/8sYGGrUVojFA6h/TRcI=
github.com/opencontainers/image-spec v1.0.1/go.mod h1:BtxoFyWECRxE4U/7sNtV5W15zMzWCbyJoFRP3s7yZA0=
github.com/opencontainers/runc v1.0.0-rc10/go.mod h1:qT5XzbpPznkRYVz/mWwUaVBUv2rmF59PVA73FjuZG0U=
github.com/opencontainers/runtime-spec v1.0.0/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0=
Expand Down
5 changes: 3 additions & 2 deletions upup/pkg/fi/assettasks/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ go_library(
"//upup/pkg/fi:go_default_library",
"//util/pkg/hashing:go_default_library",
"//util/pkg/vfs:go_default_library",
"//vendor/github.com/docker/engine-api/client:go_default_library",
"//vendor/github.com/docker/engine-api/types:go_default_library",
"//vendor/github.com/docker/docker/api/types:go_default_library",
"//vendor/github.com/docker/docker/api/types/filters:go_default_library",
"//vendor/github.com/docker/docker/client:go_default_library",
"//vendor/k8s.io/klog/v2:go_default_library",
],
)
Expand Down
16 changes: 9 additions & 7 deletions upup/pkg/fi/assettasks/docker_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ import (
"context"
"fmt"

"github.com/docker/engine-api/client"
"github.com/docker/engine-api/types"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/filters"
"github.com/docker/docker/client"
"k8s.io/klog/v2"
)

Expand All @@ -33,7 +34,7 @@ type dockerAPI struct {
// newDockerAPI builds a dockerAPI object, for talking to docker via the API
func newDockerAPI() (*dockerAPI, error) {
klog.V(4).Infof("docker creating api client")
c, err := client.NewEnvClient()
c, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
return nil, fmt.Errorf("error building docker client: %v", err)
}
Expand All @@ -58,10 +59,12 @@ func newDockerAPI() (*dockerAPI, error) {
}

// findImage does a `docker images` via the API, and finds the specified image
func (d *dockerAPI) findImage(name string) (*types.Image, error) {
func (d *dockerAPI) findImage(name string) (*types.ImageSummary, error) {
klog.V(4).Infof("docker query for image %q", name)
filter := filters.Args{}
filter.Add("reference", name)
options := types.ImageListOptions{
MatchName: name,
Filters: filter,
}
ctx := context.Background()
images, err := d.client.ImageList(ctx, options)
Expand All @@ -83,8 +86,7 @@ func (d *dockerAPI) tagImage(imageID string, ref string) error {
klog.V(4).Infof("docker tag for image %q, tag %q", imageID, ref)

ctx := context.Background()
options := types.ImageTagOptions{}
err := d.client.ImageTag(ctx, imageID, ref, options)
err := d.client.ImageTag(ctx, imageID, ref)
if err != nil {
return fmt.Errorf("error tagging image %q with tag %q: %v", imageID, ref, err)
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

267 changes: 267 additions & 0 deletions vendor/github.com/docker/distribution/registry/api/errcode/errors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 82eecaa

Please sign in to comment.