docker: migrate to github.com/moby/moby modules#3757
Conversation
container/docker/handler.go
Outdated
| c := ctnr | ||
| if networkMode.IsContainer() { | ||
| containerID := networkMode.ConnectedContainer() | ||
| res, err := client.ContainerInspect(context.Background(), containerID, dclient.ContainerInspectOptions{}) | ||
| if err != nil { | ||
| return nil, fmt.Errorf("failed to inspect container %q: %v", id, err) | ||
| } | ||
| ipAddress = c.NetworkSettings.IPAddress | ||
| c = res.Container | ||
| } | ||
| for n, nw := range c.NetworkSettings.Networks { | ||
| if n == c.HostConfig.NetworkMode.NetworkName() { | ||
| if nw.IPAddress.IsValid() { | ||
| handler.ipAddress = nw.IPAddress.String() | ||
| } | ||
| } |
There was a problem hiding this comment.
cc @robmry perhaps you could have a peek if this is the correct approach for the IP-address
|
cc @dims if you can give CI a kick to have it run 😅 |
| dockerClient, dockerClientErr = dclient.New( | ||
| dclient.WithHost(*ArgDockerEndpoint), | ||
| dclient.WithHTTPClient(client), | ||
| dclient.WithAPIVersionNegotiation()) |
There was a problem hiding this comment.
This is now enabled by default
70c045c to
f0de6b6
Compare
Done! |
|
Ah, thanks! And looks like I missed some change somewhere; let me have a look 👍 |
f0de6b6 to
632e89a
Compare
2442160 to
cfbcb5d
Compare
|
@thaJeztah this is in draft. please do switch it over and poke me when ready. |
7edc676 to
524fc1e
Compare
|
@thaJeztah when you get a chance, let's please rebase this (and drop the draft status) |
524fc1e to
701bec6
Compare
|
Rebased, and moved out of draft; I should call out that the moby client dropped support for API versions older than v1.44, so no longer supports docker older than 25.0. Not sure if that's a problem for this project? |
I don't think so! will call it out in changelog |
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
701bec6 to
bda6459
Compare
|
Rebased after #3812 was merged 😅 |
|
thanks @thaJeztah |
|
YW! Thanks for reviewing (and kicking CI 😂 ) |
depends on / stacked on;