Commit db4accdb authored by Kamil Trzciński's avatar Kamil Trzciński 🔴

Pin to specific Docker API version

parent 4325166c
Pipeline #103541 passed with stage
package docker
const dockerAPIVersion = "1.18"
......@@ -423,11 +423,12 @@ func (s *DockerExecutor) connect() (*docker.Client, error) {
}
if tlsVerify {
client, err := docker.NewTLSClient(
client, err := docker.NewVersionedTLSClient(
endpoint,
filepath.Join(tlsCertPath, "cert.pem"),
filepath.Join(tlsCertPath, "key.pem"),
filepath.Join(tlsCertPath, "ca.pem"),
dockerAPIVersion,
)
if err != nil {
return nil, err
......@@ -435,7 +436,7 @@ func (s *DockerExecutor) connect() (*docker.Client, error) {
return client, nil
} else {
client, err := docker.NewClient(endpoint)
client, err := docker.NewVersionedClient(endpoint, dockerAPIVersion)
if err != nil {
return nil, err
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment