Skip to content

Commit

Permalink
Merge pull request #155 from jesseduffield/docker_env
Browse files Browse the repository at this point in the history
Respect Environment Variables
  • Loading branch information
dawidd6 committed Aug 25, 2019
2 parents b8d477f + 1258471 commit febfce9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkg/commands/docker.go
Expand Up @@ -68,7 +68,12 @@ func (c *DockerCommand) NewCommandObject(obj CommandObject) CommandObject {

// NewDockerCommand it runs docker commands
func NewDockerCommand(log *logrus.Entry, osCommand *OSCommand, tr *i18n.TranslationSet, config *config.AppConfig, errorChan chan error) (*DockerCommand, error) {
cli, err := client.NewClientWithOpts(client.WithVersion(APIVersion))
opts := []func(*client.Client) error{
client.WithVersion(APIVersion),
client.FromEnv,
}

cli, err := client.NewClientWithOpts(opts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit febfce9

Please sign in to comment.