mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-21 23:01:03 +00:00
Merge pull request #155 from jesseduffield/docker_env
Respect Environment Variables
This commit is contained in:
commit
febfce995c
1 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue