add support for TLS via NewClientFromEnv(), remove dockerHost config param

This commit is contained in:
Bradley Cicenas 2017-03-09 22:57:12 +00:00
parent 03d4869361
commit 96b01eb3b9
2 changed files with 1 additions and 7 deletions

View File

@ -2,11 +2,6 @@ package config
// defaults
var params = []*Param{
&Param{
Key: "dockerHost",
Val: getEnv("DOCKER_HOST", "unix:///var/run/docker.sock"),
Label: "Docker API URL",
},
&Param{
Key: "filterStr",
Val: "",

View File

@ -4,7 +4,6 @@ import (
"sort"
"strings"
"github.com/bcicen/ctop/config"
"github.com/bcicen/ctop/metrics"
"github.com/fsouza/go-dockerclient"
)
@ -22,7 +21,7 @@ type DockerContainerSource struct {
func NewDockerContainerSource() *DockerContainerSource {
// init docker client
client, err := docker.NewClient(config.GetVal("dockerHost"))
client, err := docker.NewClientFromEnv()
if err != nil {
panic(err)
}