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
|
// defaults
|
||||||
var params = []*Param{
|
var params = []*Param{
|
||||||
&Param{
|
|
||||||
Key: "dockerHost",
|
|
||||||
Val: getEnv("DOCKER_HOST", "unix:///var/run/docker.sock"),
|
|
||||||
Label: "Docker API URL",
|
|
||||||
},
|
|
||||||
&Param{
|
&Param{
|
||||||
Key: "filterStr",
|
Key: "filterStr",
|
||||||
Val: "",
|
Val: "",
|
||||||
|
@ -4,7 +4,6 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/bcicen/ctop/config"
|
|
||||||
"github.com/bcicen/ctop/metrics"
|
"github.com/bcicen/ctop/metrics"
|
||||||
"github.com/fsouza/go-dockerclient"
|
"github.com/fsouza/go-dockerclient"
|
||||||
)
|
)
|
||||||
@ -22,7 +21,7 @@ type DockerContainerSource struct {
|
|||||||
|
|
||||||
func NewDockerContainerSource() *DockerContainerSource {
|
func NewDockerContainerSource() *DockerContainerSource {
|
||||||
// init docker client
|
// init docker client
|
||||||
client, err := docker.NewClient(config.GetVal("dockerHost"))
|
client, err := docker.NewClientFromEnv()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user