update github.com/compose-spec/compose-go to v1.9.0

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2023-02-03 03:19:59 +01:00
parent d2fa4a5724
commit 21ac4c34fb
14 changed files with 284 additions and 233 deletions

View File

@ -85,6 +85,9 @@ func normalize(project *types.Project, resolvePaths bool) error {
}
s.Build.Args = s.Build.Args.Resolve(fn)
}
for j, f := range s.EnvFile {
s.EnvFile[j] = absPath(project.WorkingDir, f)
}
s.Environment = s.Environment.Resolve(fn)
err := relocateLogDriver(&s)
@ -110,6 +113,14 @@ func normalize(project *types.Project, resolvePaths bool) error {
project.Services[i] = s
}
for name, config := range project.Volumes {
if config.Driver == "local" && config.DriverOpts["o"] == "bind" {
// This is actually a bind mount
config.DriverOpts["device"] = absPath(project.WorkingDir, config.DriverOpts["device"])
project.Volumes[name] = config
}
}
setNameFromKey(project)
return nil