8000 chore: fix Docker Deprecations by tucksaun · Pull Request #607 · symfony-cli/symfony-cli · GitHub
[go: up one dir, main page]

Skip to content

chore: fix Docker Deprecations #607

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

Merged
merged 1 commit into from
May 9, 2025
Merged
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
8000
Diff view
5 changes: 2 additions & 3 deletions envs/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import (

compose "github.com/compose-spec/compose-go/cli"
composeConsts "github.com/compose-spec/compose-go/consts"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
docker "github.com/docker/docker/client"
"github.com/symfony-cli/terminal"
Expand All @@ -53,7 +52,7 @@ func ComputeDockerUserAgent(appName, appVersion string) {
dockerUserAgent = fmt.Sprintf("Docker-Client/%s %s/%s", dockerClientVersion, appName, appVersion)
}

type sortedPorts []types.Port
type sortedPorts []container.Port

func (ps sortedPorts) Len() int { return len(ps) }
func (ps sortedPorts) Swap(i, j int) { ps[i], ps[j] = ps[j], ps[i] }
Expand Down Expand Up @@ -148,7 +147,7 @@ func (l *Local) RelationshipsFromDocker() Relationships {
return relationships
}

func (l *Local) dockerServiceToRelationship(client *docker.Client, container types.Container) map[string]map[string]interface{} {
func (l *Local) dockerServiceToRelationship(client *docker.Client, container container.Summary) map[string]map[string]interface{} {
if l.Debug {
fmt.Fprintf(os.Stderr, `found Docker container "%s" for project "%s" (image "%s")`+"\n", container.Labels["com.docker.compose.service"], container.Labels["com.docker.compose.project"], container.Image)
}
Expand Down
0