mirror of
https://github.com/bcicen/ctop.git
synced 2024-08-30 18:23:19 +00:00
add support for TLS via NewClientFromEnv(), remove dockerHost config param
This commit is contained in:
parent
03d4869361
commit
96b01eb3b9
@ -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: "",
|
||||
|
@ -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)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user