Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

docker-compose –env-file unknown flag

Today I updated Docker (Docker for Mac) to 4.22.0

When I try to execute

docker-compose up --env-file .env.local

I get

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

unknown flag: --env-file

I could make it work if I create a new file .env, but is there a way to pass the env file as an argument of docker-compose?

>Solution :

Following the official documentation you should specify it with the command:

 docker compose --env-file .env.local up

The file path is relative to the current working directory where the Docker Compose command is executed.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading