MCPcopy
hub / github.com/docker/compose / isRemoteConfig

Function isRemoteConfig

cmd/compose/options.go:91–102  ·  view source on GitHub ↗

isRemoteConfig checks if the main compose file is from a remote source (OCI or Git)

(dockerCli command.Cli, options buildOptions)

Source from the content-addressed store, hash-verified

89
90// isRemoteConfig checks if the main compose file is from a remote source (OCI or Git)
91func isRemoteConfig(dockerCli command.Cli, options buildOptions) bool {
92 if len(options.ConfigPaths) == 0 {
93 return false
94 }
95 remoteLoaders := options.remoteLoaders(dockerCli)
96 for _, loader := range remoteLoaders {
97 if loader.Accept(options.ConfigPaths[0]) {
98 return true
99 }
100 }
101 return false
102}
103
104// checksForRemoteStack handles environment variable prompts for remote configurations
105func checksForRemoteStack(ctx context.Context, dockerCli command.Cli, project *types.Project, options buildOptions, assumeYes bool, cmdEnvs []string) error {

Callers 2

TestIsRemoteConfigFunction · 0.85
checksForRemoteStackFunction · 0.85

Calls 2

remoteLoadersMethod · 0.80
AcceptMethod · 0.45

Tested by 1

TestIsRemoteConfigFunction · 0.68