Skip to content

Commit

Permalink
Use client.FromEnv when creating the docker client
Browse files Browse the repository at this point in the history
  • Loading branch information
daniponsg committed Jul 31, 2024
1 parent 62fcaa3 commit a067f40
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [0.5.2] - 2024-07-31
### Fixed
- Use `client.FromEnv` when creating docker client

## [0.5.1] - 2024-07-31
### Update
- Bump `docker/docker` to `v26.1.4`
Expand Down
2 changes: 1 addition & 1 deletion puller.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (i *ImagePullerImpl) tryPullImage(ctx context.Context, imageName string) er
authStr = base64.URLEncoding.EncodeToString(encodedJSON)
}

cli, err := client.NewClientWithOpts()
cli, err := client.NewClientWithOpts(client.FromEnv)
if err != nil {
return fmt.Errorf("creating docker client: %v", err)
}
Expand Down
2 changes: 1 addition & 1 deletion runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ func (r *Runner) startContainer(ctx context.Context) {

func (r *Runner) createDockerClient() {
var err error
r.client, err = client.NewClientWithOpts()
r.client, err = client.NewClientWithOpts(client.FromEnv)
r.require.NoError(err, "Unable to create a docker client: %v", err)
}

Expand Down

0 comments on commit a067f40

Please sign in to comment.