Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump docker/docker to v28.0.0+incompatible #2071

Merged
merged 2 commits into from
Feb 25, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ require (
github.com/containerd/stargz-snapshotter/estargz v0.16.3
github.com/docker/cli v27.5.0+incompatible
github.com/docker/distribution v2.8.3+incompatible
github.com/docker/docker v27.5.0+incompatible
github.com/docker/docker v28.0.0+incompatible
github.com/google/go-cmp v0.6.0
github.com/klauspost/compress v1.17.11
github.com/mitchellh/go-homedir v1.1.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum

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

4 changes: 2 additions & 2 deletions pkg/v1/daemon/image.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import (
"sync"
"time"

api "github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
api "github.com/docker/docker/api/types/image"

"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
Expand Down Expand Up @@ -266,7 +266,7 @@ func (i *image) diffIDs(rootFS api.RootFS) ([]v1.Hash, error) {
return diffIDs, nil
}

func (i *image) computeConfigFile(inspect api.ImageInspect) (*v1.ConfigFile, error) {
func (i *image) computeConfigFile(inspect api.InspectResponse) (*v1.ConfigFile, error) {
diffIDs, err := i.diffIDs(inspect.RootFS)
if err != nil {
return nil, err
Expand Down
17 changes: 9 additions & 8 deletions pkg/v1/daemon/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ import (

"github.com/docker/docker/api/types/container"
api "github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/storage"
"github.com/docker/docker/client"

"github.com/docker/docker/api/types"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/compare"
"github.com/google/go-containerregistry/pkg/v1/tarball"
Expand All @@ -35,7 +36,7 @@ import (

var imagePath = "../tarball/testdata/test_image_1.tar"

var inspectResp = types.ImageInspect{
var inspectResp = api.InspectResponse{
ID: "sha256:6e0b05049ed9c17d02e1a55e80d6599dbfcce7f4f4b022e3c673e685789c470e",
RepoTags: []string{
"bazel/v1/tarball:test_image_1",
Expand All @@ -48,15 +49,15 @@ var inspectResp = types.ImageInspect{
Size: 8,
VirtualSize: 8,
Config: &container.Config{},
GraphDriver: types.GraphDriverData{
GraphDriver: storage.DriverData{
Data: map[string]string{
"MergedDir": "/var/lib/docker/overlay2/988ecd005d048fd47b241dd57687231859563ba65a1dfd01ae1771ebfc4cb7c5/merged",
"UpperDir": "/var/lib/docker/overlay2/988ecd005d048fd47b241dd57687231859563ba65a1dfd01ae1771ebfc4cb7c5/diff",
"WorkDir": "/var/lib/docker/overlay2/988ecd005d048fd47b241dd57687231859563ba65a1dfd01ae1771ebfc4cb7c5/work",
},
Name: "overlay2",
},
RootFS: types.RootFS{
RootFS: api.RootFS{
Type: "layers",
Layers: []string{
"sha256:8897395fd26dc44ad0e2a834335b33198cb41ac4d98dfddf58eced3853fa7b17",
Expand All @@ -78,7 +79,7 @@ type MockClient struct {
saveBody io.ReadCloser

inspectErr error
inspectResp types.ImageInspect
inspectResp api.InspectResponse
inspectBody []byte

tagErr error
Expand All @@ -88,7 +89,7 @@ func (m *MockClient) NegotiateAPIVersion(_ context.Context) {
m.negotiated = true
}

func (m *MockClient) ImageSave(_ context.Context, _ []string) (io.ReadCloser, error) {
func (m *MockClient) ImageSave(_ context.Context, _ []string, _ ...client.ImageSaveOption) (io.ReadCloser, error) {
if !m.negotiated {
return nil, errors.New("you forgot to call NegotiateAPIVersion before calling ImageSave")
}
Expand All @@ -100,11 +101,11 @@ func (m *MockClient) ImageSave(_ context.Context, _ []string) (io.ReadCloser, er
return m.saveBody, m.saveErr
}

func (m *MockClient) ImageInspectWithRaw(_ context.Context, _ string) (types.ImageInspect, []byte, error) {
func (m *MockClient) ImageInspectWithRaw(_ context.Context, _ string) (api.InspectResponse, []byte, error) {
return m.inspectResp, m.inspectBody, m.inspectErr
}

func (m *MockClient) ImageHistory(_ context.Context, _ string) ([]api.HistoryResponseItem, error) {
func (m *MockClient) ImageHistory(_ context.Context, _ string, _ ...client.ImageHistoryOption) ([]api.HistoryResponseItem, error) {
return []api.HistoryResponseItem{
{
CreatedBy: "bazel build ...",
Expand Down
9 changes: 4 additions & 5 deletions pkg/v1/daemon/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
"context"
"io"

"github.com/docker/docker/api/types"
api "github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
)
Expand Down Expand Up @@ -97,9 +96,9 @@ func WithContext(ctx context.Context) Option {
// package uses.
type Client interface {
NegotiateAPIVersion(ctx context.Context)
ImageSave(context.Context, []string) (io.ReadCloser, error)
ImageLoad(context.Context, io.Reader, bool) (api.LoadResponse, error)
ImageSave(context.Context, []string, ...client.ImageSaveOption) (io.ReadCloser, error)
ImageLoad(context.Context, io.Reader, ...client.ImageLoadOption) (api.LoadResponse, error)
ImageTag(context.Context, string, string) error
ImageInspectWithRaw(context.Context, string) (types.ImageInspect, []byte, error)
ImageHistory(context.Context, string) ([]api.HistoryResponseItem, error)
ImageInspectWithRaw(context.Context, string) (api.InspectResponse, []byte, error)
ImageHistory(context.Context, string, ...client.ImageHistoryOption) ([]api.HistoryResponseItem, error)
}
3 changes: 2 additions & 1 deletion pkg/v1/daemon/write.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"fmt"
"io"

"github.com/docker/docker/client"
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/tarball"
Expand Down Expand Up @@ -64,7 +65,7 @@ func Write(tag name.Tag, img v1.Image, options ...Option) (string, error) {
}()

// write the image in docker save format first, then load it
resp, err := o.client.ImageLoad(o.ctx, pr, false)
resp, err := o.client.ImageLoad(o.ctx, pr, client.ImageLoadWithQuiet(false))
if err != nil {
return "", fmt.Errorf("error loading image: %w", err)
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/v1/daemon/write_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"testing"

api "github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"

"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/empty"
Expand All @@ -37,7 +38,7 @@ func (r *errReader) Read(_ []byte) (int, error) {
return 0, r.err
}

func (m *MockClient) ImageLoad(ctx context.Context, r io.Reader, _ bool) (api.LoadResponse, error) {
func (m *MockClient) ImageLoad(ctx context.Context, r io.Reader, _ ...client.ImageLoadOption) (api.LoadResponse, error) {
if !m.negotiated {
return api.LoadResponse{}, errors.New("you forgot to call NegotiateAPIVersion before calling ImageLoad")
}
Expand Down
32 changes: 31 additions & 1 deletion vendor/github.com/docker/docker/AUTHORS

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

Loading
Loading