Merge pull request #1091 from docker/dotEnv

Add support for .env file when loading compose files
This commit is contained in:
Guillaume Tardif 2021-01-04 10:13:18 +01:00 committed by GitHub
commit 4dd8931d0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -65,6 +65,7 @@ func (o *composeOptions) toProjectName() (string, error) {
func (o *composeOptions) toProjectOptions() (*cli.ProjectOptions, error) { func (o *composeOptions) toProjectOptions() (*cli.ProjectOptions, error) {
return cli.NewProjectOptions(o.ConfigPaths, return cli.NewProjectOptions(o.ConfigPaths,
cli.WithOsEnv, cli.WithOsEnv,
cli.WithDotEnv,
cli.WithEnv(o.Environment), cli.WithEnv(o.Environment),
cli.WithWorkingDirectory(o.WorkingDir), cli.WithWorkingDirectory(o.WorkingDir),
cli.WithName(o.Name)) cli.WithName(o.Name))