respect DOCKER_HOST

This commit is contained in:
Dawid Dziurla 2019-08-25 19:07:13 +02:00
parent b8d477f4e5
commit 1258471af2
No known key found for this signature in database
GPG key ID: 7B6D8368172E9B0B

View file

@ -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
}