Skip to content

Commit

Permalink
NewDockerContainer: use API version negotiation
Browse files Browse the repository at this point in the history
This helps in situations where the daemon is older than
the API client. API version negotiation checks the maximum
supported API version by the daemon, and downgrades to that
API version if needed.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
  • Loading branch information
thaJeztah committed Aug 17, 2019
1 parent 15af263 commit dfc35e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions testing/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func NewDockerContainer(t testing.TB, image string, env []string, cmd []string)
if err != nil {
return nil, err
}
c.NegotiateAPIVersion(context.TODO())

if cmd == nil {
cmd = make([]string, 0)
Expand Down

0 comments on commit dfc35e9

Please sign in to comment.