This commit is contained in:
Ross Cadogan 2016-10-13 21:40:16 +01:00
parent 99ed959155
commit ed035d6191

20
main.go
View file

@ -1,6 +1,7 @@
package main // import "github.com/CenturyLinkLabs/watchtower" package main // import "github.com/CenturyLinkLabs/watchtower"
import ( import (
"context"
"crypto/tls" "crypto/tls"
"crypto/x509" "crypto/x509"
"fmt" "fmt"
@ -11,22 +12,21 @@ import (
"sync" "sync"
"syscall" "syscall"
"time" "time"
"context"
"github.com/CenturyLinkLabs/watchtower/actions" "github.com/CenturyLinkLabs/watchtower/actions"
"github.com/CenturyLinkLabs/watchtower/container" "github.com/CenturyLinkLabs/watchtower/container"
log "github.com/Sirupsen/logrus" log "github.com/Sirupsen/logrus"
"github.com/codegangsta/cli" "github.com/codegangsta/cli"
dockerclient "github.com/docker/docker/client"
"github.com/docker/docker/api/types" "github.com/docker/docker/api/types"
dockerclient "github.com/docker/docker/client"
) )
var ( var (
wg sync.WaitGroup wg sync.WaitGroup
client container.Client client container.Client
registryClient container.Client registryClient container.Client
pollInterval time.Duration pollInterval time.Duration
cleanup bool cleanup bool
) )
func init() { func init() {
@ -136,9 +136,9 @@ func login(c *cli.Context) {
panic(err) panic(err)
} }
regAuth := types.AuthConfig{ regAuth := types.AuthConfig{
Username: "testuser", Username: "testuser",
Password: "testpassword", Password: "testpassword",
ServerAddress: registry, ServerAddress: registry,
} }
resp, err := clint.RegistryLogin(context.Background(), regAuth) resp, err := clint.RegistryLogin(context.Background(), regAuth)
if err != nil { if err != nil {