Skip to content

Commit

Permalink
Merge pull request #264 from buildpacks/bump-docker-26.0.1
Browse files Browse the repository at this point in the history
Bump github.com/docker/docker to version 26.0.1 (and fix lint)
  • Loading branch information
natalieparellano authored Apr 11, 2024
2 parents 9478f0a + ea24f49 commit e29bd65
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 11 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module github.com/buildpacks/imgutil

require (
github.com/docker/docker v25.0.5+incompatible
github.com/docker/docker v26.0.1+incompatible
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.19.1
github.com/pkg/errors v0.9.1
Expand All @@ -26,6 +26,7 @@ require (
github.com/gogo/protobuf v1.3.2 // indirect
github.com/klauspost/compress v1.16.5 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/morikuni/aec v1.0.0 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
Expand Down
6 changes: 4 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ github.com/docker/cli v24.0.2+incompatible h1:QdqR7znue1mtkXIJ+ruQMGQhpw2JzMJLRX
github.com/docker/cli v24.0.2+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m322EBzniBPB6ZIzuh8=
github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v25.0.5+incompatible h1:UmQydMduGkrD5nQde1mecF/YnSbTOaPeFIeP5C4W+DE=
github.com/docker/docker v25.0.5+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v26.0.1+incompatible h1:t39Hm6lpXuXtgkF0dm1t9a5HkbUfdGy6XbWexmGr+hA=
github.com/docker/docker v26.0.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-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
Expand Down Expand Up @@ -50,6 +50,8 @@ github.com/klauspost/compress v1.16.5 h1:IFV2oUNUzZaz+XyusxpLzpzS8Pt5rh0Z16For/d
github.com/klauspost/compress v1.16.5/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/moby/docker-image-spec v1.3.1 h1:jMKff3w6PgbfSa69GfNg+zN/XLhfXJGnEx3Nl2EsFP0=
github.com/moby/docker-image-spec v1.3.1/go.mod h1:eKmb5VW8vQEh/BAr2yvVNvuiJuY6UIocYsFu/DxxRpo=
github.com/moby/term v0.5.0 h1:xt8Q1nalod/v7BqbG21f8mQPqH+xAaC9C3N3wfWbVP0=
github.com/moby/term v0.5.0/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
Expand Down
4 changes: 2 additions & 2 deletions local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"testing"
"time"

"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/google/go-containerregistry/pkg/authn"
v1 "github.com/google/go-containerregistry/pkg/v1"
Expand Down Expand Up @@ -2229,7 +2229,7 @@ func testImage(t *testing.T, when spec.G, it spec.S) {
it.Before(func() {
h.AssertNil(t, dockerClient.ImageTag(context.TODO(), origImg.Name(), newTag))

_, err := dockerClient.ImageRemove(context.TODO(), origImg.Name(), types.ImageRemoveOptions{})
_, err := dockerClient.ImageRemove(context.TODO(), origImg.Name(), image.RemoveOptions{})
h.AssertNil(t, err)
})

Expand Down
4 changes: 2 additions & 2 deletions local/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ type DockerClient interface {
ImageHistory(ctx context.Context, image string) ([]image.HistoryResponseItem, error)
ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
ImageLoad(ctx context.Context, input io.Reader, quiet bool) (types.ImageLoadResponse, error)
ImageRemove(ctx context.Context, image string, options types.ImageRemoveOptions) ([]image.DeleteResponse, error)
ImageRemove(ctx context.Context, image string, options image.RemoveOptions) ([]image.DeleteResponse, error)
ImageSave(ctx context.Context, images []string) (io.ReadCloser, error)
ImageTag(ctx context.Context, image, ref string) error
Info(ctx context.Context) (system.Info, error)
Expand Down Expand Up @@ -71,7 +71,7 @@ func (s *Store) Delete(identifier string) error {
if !s.Contains(identifier) {
return nil
}
options := types.ImageRemoveOptions{
options := image.RemoveOptions{
Force: true,
PruneChildren: true,
}
Expand Down
8 changes: 4 additions & 4 deletions testhelpers/testhelpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"
"time"

dockertypes "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
dockercli "github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/google/go-cmp/cmp"
Expand Down Expand Up @@ -172,10 +172,10 @@ func PullIfMissing(t *testing.T, docker dockercli.CommonAPIClient, ref string) {
t.Fatalf("failed inspecting image '%s': %s", ref, err)
}

rc, err := docker.ImagePull(context.Background(), ref, dockertypes.ImagePullOptions{})
rc, err := docker.ImagePull(context.Background(), ref, image.PullOptions{})
if err != nil {
// Retry
rc, err = docker.ImagePull(context.Background(), ref, dockertypes.ImagePullOptions{})
rc, err = docker.ImagePull(context.Background(), ref, image.PullOptions{})
AssertNil(t, err)
}
defer rc.Close()
Expand All @@ -193,7 +193,7 @@ func DockerRmi(dockerCli dockercli.CommonAPIClient, repoNames ...string) error {
_, e := dockerCli.ImageRemove(
ctx,
repoName,
dockertypes.ImageRemoveOptions{PruneChildren: true},
image.RemoveOptions{PruneChildren: true},
)
if e != nil && err == nil {
err = e
Expand Down

0 comments on commit e29bd65

Please sign in to comment.