Skip to content

Commit

Permalink
go.mod: github.com/docker/docker b570831cc3a3 (master, v28.0.0-rc.2)
Browse files Browse the repository at this point in the history
full diff: moby/moby@v28.0.0-rc.1...b570831

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Feb 11, 2025
1 parent e9da8fe commit 5b006b2
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/docker/buildx v0.20.0-rc3.0.20250211094701-f5802119c511 // master (v0.21.0-dev)
github.com/docker/cli v28.0.0-rc.1+incompatible
github.com/docker/cli-docs-tool v0.9.0
github.com/docker/docker v28.0.0-rc.1+incompatible
github.com/docker/docker v28.0.0-rc.1.0.20250211164921-b570831cc3a3+incompatible // master (v28.0.0-rc.2)
github.com/docker/go-connections v0.5.0
github.com/docker/go-units v0.5.0
github.com/eiannone/keyboard v0.0.0-20220611211555-0d226195f203
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ github.com/docker/cli-docs-tool v0.9.0/go.mod h1:ClrwlNW+UioiRyH9GiAOe1o3J/TsY3T
github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/distribution v2.8.3+incompatible h1:AtKxIZ36LoNK51+Z6RpzLpddBirtxJnzDrHLEKxTAYk=
github.com/docker/distribution v2.8.3+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
github.com/docker/docker v28.0.0-rc.1+incompatible h1:xUbdsVxJIFvyZ+958MzyyIT7VuHO4Ecao9hKhl7kGUc=
github.com/docker/docker v28.0.0-rc.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker v28.0.0-rc.1.0.20250211164921-b570831cc3a3+incompatible h1:XHjzdPvMafmekjBHZDiS+aQUvfog6oSaCO/dtoZvFxM=
github.com/docker/docker v28.0.0-rc.1.0.20250211164921-b570831cc3a3+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
github.com/docker/docker-credential-helpers v0.8.2 h1:bX3YxiGzFP5sOXWc3bTPEXdEaZSeVMrFgOr3T+zrFAo=
github.com/docker/docker-credential-helpers v0.8.2/go.mod h1:P3ci7E3lwkZg6XiHdRKft1KckHiO9a2rNtyFbZ/ry9M=
github.com/docker/go v1.5.1-1.0.20160303222718-d30aec9fd63c h1:lzqkGL9b3znc+ZUgi7FlLnqjQhcXxkNM/quxIjBVMD0=
Expand Down
10 changes: 5 additions & 5 deletions pkg/api/dryrunclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,15 +309,15 @@ func (d *DryRunClient) VolumeRemove(ctx context.Context, volumeID string, force
return nil
}

func (d *DryRunClient) ContainerExecCreate(ctx context.Context, container string, config containerType.ExecOptions) (moby.IDResponse, error) {
func (d *DryRunClient) ContainerExecCreate(ctx context.Context, container string, config containerType.ExecOptions) (containerType.ExecCreateResponse, error) {
b := make([]byte, 32)
_, _ = rand.Read(b)
id := fmt.Sprintf("%x", b)
d.execs.Store(id, execDetails{
container: container,
command: config.Cmd,
})
return moby.IDResponse{
return containerType.ExecCreateResponse{
ID: id,
}, nil
}
Expand Down Expand Up @@ -354,7 +354,7 @@ func (d *DryRunClient) ConfigUpdate(ctx context.Context, id string, version swar
return d.apiClient.ConfigUpdate(ctx, id, version, config)
}

func (d *DryRunClient) ContainerCommit(ctx context.Context, container string, options containerType.CommitOptions) (moby.IDResponse, error) {
func (d *DryRunClient) ContainerCommit(ctx context.Context, container string, options containerType.CommitOptions) (containerType.CommitResponse, error) {
return d.apiClient.ContainerCommit(ctx, container, options)
}

Expand Down Expand Up @@ -402,11 +402,11 @@ func (d *DryRunClient) ContainerStatsOneShot(ctx context.Context, container stri
return d.apiClient.ContainerStatsOneShot(ctx, container)
}

func (d *DryRunClient) ContainerTop(ctx context.Context, container string, arguments []string) (containerType.ContainerTopOKBody, error) {
func (d *DryRunClient) ContainerTop(ctx context.Context, container string, arguments []string) (containerType.TopResponse, error) {
return d.apiClient.ContainerTop(ctx, container, arguments)
}

func (d *DryRunClient) ContainerUpdate(ctx context.Context, container string, updateConfig containerType.UpdateConfig) (containerType.ContainerUpdateOKBody, error) {
func (d *DryRunClient) ContainerUpdate(ctx context.Context, container string, updateConfig containerType.UpdateConfig) (containerType.UpdateResponse, error) {
return d.apiClient.ContainerUpdate(ctx, container, updateConfig)
}

Expand Down
21 changes: 10 additions & 11 deletions pkg/compose/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,25 +25,24 @@ import (
"github.com/compose-spec/compose-go/v2/types"
"github.com/docker/compose/v2/pkg/api"
"github.com/docker/compose/v2/pkg/utils"
moby "github.com/docker/docker/api/types"
containerType "github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/pkg/stdcopy"
)

func (s composeService) runHook(ctx context.Context, container containerType.Summary, service types.ServiceConfig, hook types.ServiceHook, listener api.ContainerEventListener) error {
func (s composeService) runHook(ctx context.Context, ctr container.Summary, service types.ServiceConfig, hook types.ServiceHook, listener api.ContainerEventListener) error {
wOut := utils.GetWriter(func(line string) {
listener(api.ContainerEvent{
Type: api.HookEventLog,
Container: getContainerNameWithoutProject(container) + " ->",
ID: container.ID,
Container: getContainerNameWithoutProject(ctr) + " ->",
ID: ctr.ID,
Service: service.Name,
Line: line,
})
})
defer wOut.Close() //nolint:errcheck

detached := listener == nil
exec, err := s.apiClient().ContainerExecCreate(ctx, container.ID, containerType.ExecOptions{
exec, err := s.apiClient().ContainerExecCreate(ctx, ctr.ID, container.ExecOptions{
User: hook.User,
Privileged: hook.Privileged,
Env: ToMobyEnv(hook.Environment),
Expand All @@ -58,12 +57,12 @@ func (s composeService) runHook(ctx context.Context, container containerType.Sum
}

if detached {
return s.runWaitExec(ctx, exec, service, listener)
return s.runWaitExec(ctx, exec.ID, service, listener)
}

height, width := s.stdout().GetTtySize()
consoleSize := &[2]uint{height, width}
attach, err := s.apiClient().ContainerExecAttach(ctx, exec.ID, containerType.ExecAttachOptions{
attach, err := s.apiClient().ContainerExecAttach(ctx, exec.ID, container.ExecAttachOptions{
Tty: service.Tty,
ConsoleSize: consoleSize,
})
Expand Down Expand Up @@ -91,8 +90,8 @@ func (s composeService) runHook(ctx context.Context, container containerType.Sum
return nil
}

func (s composeService) runWaitExec(ctx context.Context, exec moby.IDResponse, service types.ServiceConfig, listener api.ContainerEventListener) error {
err := s.apiClient().ContainerExecStart(ctx, exec.ID, containerType.ExecStartOptions{
func (s composeService) runWaitExec(ctx context.Context, execID string, service types.ServiceConfig, listener api.ContainerEventListener) error {
err := s.apiClient().ContainerExecStart(ctx, execID, container.ExecStartOptions{
Detach: listener == nil,
Tty: service.Tty,
})
Expand All @@ -107,7 +106,7 @@ func (s composeService) runWaitExec(ctx context.Context, exec moby.IDResponse, s
case <-ctx.Done():
return nil
case <-tick.C:
inspect, err := s.apiClient().ContainerExecInspect(ctx, exec.ID)
inspect, err := s.apiClient().ContainerExecInspect(ctx, execID)
if err != nil {
return nil
}
Expand Down
16 changes: 8 additions & 8 deletions pkg/mocks/mock_docker_api.go

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

0 comments on commit 5b006b2

Please sign in to comment.