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
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.