mirror of
https://github.com/containrrr/watchtower.git
synced 2025-09-21 21:30:48 +02:00
Support TLS connections to remote daemons
This commit is contained in:
parent
b7424e5c47
commit
e06c46552a
2 changed files with 130 additions and 31 deletions
|
@ -1,6 +1,7 @@
|
|||
package container
|
||||
|
||||
import (
|
||||
"crypto/tls"
|
||||
"time"
|
||||
|
||||
log "github.com/Sirupsen/logrus"
|
||||
|
@ -21,8 +22,8 @@ type Client interface {
|
|||
IsContainerStale(Container) (bool, error)
|
||||
}
|
||||
|
||||
func NewClient(dockerHost string, pullImages bool) Client {
|
||||
docker, err := dockerclient.NewDockerClient(dockerHost, nil)
|
||||
func NewClient(dockerHost string, tlsConfig *tls.Config, pullImages bool) Client {
|
||||
docker, err := dockerclient.NewDockerClient(dockerHost, tlsConfig)
|
||||
|
||||
if err != nil {
|
||||
log.Fatalf("Error instantiating Docker client: %s", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue