Skip to content

Commit b0921b4

Browse files
committed
fix: Fix --env-file flag behavior in nerdctl compose
Signed-off-by: Arjun Raja Yogidas <[email protected]>
1 parent 9ece9be commit b0921b4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/composer/up_service.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ func (c *Composer) upServiceContainer(ctx context.Context, service *serviceparse
157157
runFlagD = true
158158
}
159159

160+
if c.EnvFile != "" {
161+
container.RunArgs = append([]string{"--env-file=" + c.EnvFile}, container.RunArgs...)
162+
}
163+
160164
//add metadata labels to container https://github.com/compose-spec/compose-spec/blob/master/spec.md#labels
161165
container.RunArgs = append([]string{
162166
"--cidfile=" + cidFilename,

0 commit comments

Comments
 (0)