alexei-led / pumba

Chaos testing, network emulation, and stress testing tool for containers
Apache License 2.0
2.75k stars 193 forks source link

Get the client source docker socket path dynamically #219

Closed Vr00mm closed 2 years ago

Vr00mm commented 2 years ago

Hello,

Here is a fix proposal.

Cause you are using "client" as variable name, you had to ovewrite the docker client lib as dockerapi. Cause dockerapi.NewClientWithOpts return client.Client object, we cant use method and field on this object.

The simpliest way I found to get the object field value is to use "unsafe" to catch the unreferenced field in a "reflect" object of the client.Client

The communication look working with the socket now.

Fix #218 Signed-off-by: Remi Ziolkowski remi.ziolkowski-ext@pole-emploi.fr