Our docker-compose.yml file references an env_file that gets auto-generated by a script that we run before docker-compose up. Which means that the env file isn't available when we run docker-compose build. Since the build process doesn't use environment variables, this shouldn't be a problem. But docker-compose build exits with an error of "Couldn't find env file: /foo/bar/my.env".
Instead, docker-compose build should ignore the non-existent env file. It should only print the error if the env file isn't found by the time docker-compose up is run.
Our docker-compose.yml file references an
env_filethat gets auto-generated by a script that we run beforedocker-compose up. Which means that the env file isn't available when we rundocker-compose build. Since the build process doesn't use environment variables, this shouldn't be a problem. Butdocker-compose buildexits with an error of "Couldn't find env file: /foo/bar/my.env".Instead,
docker-compose buildshould ignore the non-existent env file. It should only print the error if the env file isn't found by the timedocker-compose upis run.