1 Star 0 Fork 0

docker-mirror / libcompose

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
context.go 750 Bytes
一键复制 编辑 原始数据 按行查看 历史
lilongyu 提交于 2020-09-24 10:38 . Initial commit
package docker
import (
"github.com/docker/docker/cliconfig"
"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 project.ClientFactory
ConfigDir string
ConfigFile *cliconfig.ConfigFile
AuthLookup AuthLookup
}
func (c *Context) open() error {
return c.LookupConfig()
}
// 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
}
1
https://gitee.com/docker-mirror/libcompose.git
git@gitee.com:docker-mirror/libcompose.git
docker-mirror
libcompose
libcompose
7676619a9822

搜索帮助