forked from Ivasoft/traefik
Update traefik dependencies (docker/docker and related) (#1823)
Update traefik dependencies (docker/docker and related) - Update dependencies - Fix compilation problems - Remove vdemeester/docker-events (in docker api now) - Remove `integration/vendor` - Use `testImport` - update some deps. - regenerate the lock from scratch (after a `glide cc`)
This commit is contained in:
committed by
Ludovic Fernandez
parent
7d178f49b4
commit
b7daa2f3a4
35
vendor/github.com/docker/libcompose/docker/ctx/context.go
generated
vendored
Normal file
35
vendor/github.com/docker/libcompose/docker/ctx/context.go
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
package ctx
|
||||
|
||||
import (
|
||||
cliconfig "github.com/docker/cli/cli/config"
|
||||
"github.com/docker/cli/cli/config/configfile"
|
||||
"github.com/docker/libcompose/docker/auth"
|
||||
"github.com/docker/libcompose/docker/client"
|
||||
"github.com/docker/libcompose/project"
|
||||
)
|
||||
|
||||
// Context holds context meta information about a libcompose project and docker
|
||||
// client information (like configuration file, builder to use, …)
|
||||
type Context struct {
|
||||
project.Context
|
||||
ClientFactory client.Factory
|
||||
ConfigDir string
|
||||
ConfigFile *configfile.ConfigFile
|
||||
AuthLookup auth.Lookup
|
||||
}
|
||||
|
||||
// LookupConfig tries to load the docker configuration files, if any.
|
||||
func (c *Context) LookupConfig() error {
|
||||
if c.ConfigFile != nil {
|
||||
return nil
|
||||
}
|
||||
|
||||
config, err := cliconfig.Load(c.ConfigDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
c.ConfigFile = config
|
||||
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user