microsoft / DockerTools

Tools For Docker, including Visual Studio Provisioning and Publishing
Other
175 stars 26 forks source link

How can I specify the .env files for docker compose to run? #317

Closed nicholasyin closed 2 years ago

nicholasyin commented 2 years ago

I found this document where I know how to specify if I have multiple docker compose yml files with any file names. However, this document doesn't mention anything about passing the .env files. How can I do that?

ravipal commented 2 years ago

@nicholasyin I think you are using the DockerComposeBaseFilePath to use different compose file names. Similarly, you could use DockerComposeUpArguments to pass different environment file using the argument --env-file test1.env

nicholasyin commented 2 years ago

Good to know. Thanks a lot.