Skip to content

Commit

Permalink
chages per review requests
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Vasek <[email protected]>
  • Loading branch information
matejvasek committed Oct 25, 2021
1 parent 9392a67 commit 81503c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion client.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ func WithRegistryMirrors(registryMirrors map[string]string) ClientOption {
}
}

const DockerAPIVersion = "1.38"

// NewClient allocates and returns a Client configured with the specified options.
func NewClient(opts ...ClientOption) (*Client, error) {
var client Client
Expand All @@ -165,7 +167,7 @@ func NewClient(opts ...ClientOption) (*Client, error) {
var err error
client.docker, err = dockerClient.NewClientWithOpts(
dockerClient.FromEnv,
dockerClient.WithVersion("1.38"),
dockerClient.WithVersion(DockerAPIVersion),
)
if err != nil {
return nil, errors.Wrap(err, "creating docker client")
Expand Down
3 changes: 2 additions & 1 deletion cmd/docker_init.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"os"
"strings"

"github.com/buildpacks/pack"
"github.com/buildpacks/pack/internal/sshdialer"

dockerClient "github.com/docker/docker/client"
Expand Down Expand Up @@ -49,7 +50,7 @@ func tryInitSSHDockerClient() (dockerClient.CommonAPIClient, error) {
}

dockerClientOpts := []dockerClient.Opt{
dockerClient.WithVersion("1.38"),
dockerClient.WithVersion(pack.DockerAPIVersion),
dockerClient.WithHTTPClient(httpClient),
dockerClient.WithHost("http://dummy/"),
dockerClient.WithDialContext(dialContext),
Expand Down

0 comments on commit 81503c3

Please sign in to comment.