From d8e1a48e6946a98dcf3203d0ea0b85d879c76297 Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 7 Feb 2022 10:57:28 -0500 Subject: [PATCH] Use system environment variables when building docker-compose (#495) --- airflow/docker.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/airflow/docker.go b/airflow/docker.go index 0a55b4fdc..2b31cefe8 100644 --- a/airflow/docker.go +++ b/airflow/docker.go @@ -15,6 +15,7 @@ import ( "github.com/astronomer/astro-cli/config" "github.com/astronomer/astro-cli/messages" + composeInterp "github.com/compose-spec/compose-go/interpolation" "github.com/compose-spec/compose-go/loader" composeTypes "github.com/compose-spec/compose-go/types" "github.com/docker/cli/cli/config/configfile" @@ -300,12 +301,14 @@ func createProject(projectName, airflowHome, envFile string, labels map[string]s loaderOption := func(opts *loader.Options) { opts.Name = projectName + opts.Interpolate = &composeInterp.Options{ + LookupValue: os.LookupEnv, + } } project, err := loader.Load(composeTypes.ConfigDetails{ ConfigFiles: configs, WorkingDir: airflowHome, - Environment: map[string]string{}, }, loaderOption) return project, err