This was caused by docker compose trying to load a .env file in my path. The env file had variables not supported by docker due to format issues. Example, variables with '-' in their names.
.env