-
Notifications
You must be signed in to change notification settings - Fork 604
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment variables in Compose #305
Environment variables in Compose #305
Conversation
c7a5285
to
04e8bba
Compare
5f56661
to
d943c06
Compare
ee668d7
to
e6a213f
Compare
@AkihiroSuda @ktock any idea why most of test-integration fail ? |
d8f4609
to
166864c
Compare
c0d40a6
to
27b809e
Compare
68cd9ea
to
44c3fa2
Compare
@AkihiroSuda @ktock need your review :) |
pkg/composer/composer.go
Outdated
} | ||
} | ||
|
||
// setDotEnv was inspired from https://github.com/compose-spec/compose-go/blob/de56f4f0cb3c925f41df594221148613534c2cd3/cli/options.go#L174-215 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the compose-go code directly?
What is the difference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If something is missing in the compose-go, please consider contributing to the compose-go upstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor nits, PR opened compose-spec/compose-go#166
34e5438
to
69a9323
Compare
as mentioned above @AkihiroSuda I did some modifications to use the PS: We can merge this it is ok ( this PR is independent of compose-spec PR) |
cmd/nerdctl/compose.go
Outdated
Project: clicontext.String("project-name"), | ||
NerdctlCmd: nerdctlCmd, | ||
NerdctlArgs: nerdctlArgs, | ||
DebugPrintFull: clicontext.Bool("debug-full"), | ||
} | ||
|
||
if file := clicontext.String("file"); file != "" { | ||
o.ProjectOptions.ConfigPaths = append(o.ProjectOptions.ConfigPaths, file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this be prepended rather than appended? (in theory)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! append or prepend give the same result since you can only pass a single compose file. But when we are going to accept the passage of several files, the order is important to process an override logic. I made the change
d1b6be8
to
b250c34
Compare
Signed-off-by: fahed dorgaa <fahed.dorgaa@gmail.com>
b250c34
to
7987905
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Compose :
env-file
flagrelated #252
Signed-off-by: fahed dorgaa fahed.dorgaa@gmail.com