The env_file field in the docker-compose.yml causes the .devcontainer to fail on creation #27158
-
So here’s the most important part of the
This came from using the This is part of my existing
However, as A possible solution would be to detect if this field is present somehow, and automatically have an empty temporary .env file |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
There’s an Hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Hi, thank you for your response! Where can I find the documentation about |
Beta Was this translation helpful? Give feedback.
-
@LeptoFlare you can find the docs at devcontainer.json reference. Here’s the description for the
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Looks like this is a bug. Sorry about that! The command is supposed to be executed from the repo root. We’ll work on a fix. In the mean time, you can hardcode it to the path you’ve referenced, but I agree that’s not a good long-term solution. |
Beta Was this translation helpful? Give feedback.
-
Hardcoding it has worked, but the environment variables in the file are not being exported I tried looking in the documentation of .devcontainer but I could not figure out how to get it to properly export |
Beta Was this translation helpful? Give feedback.
-
@LeptoFlare, can you share the repo you are working on (or a different public repo that simulates the same issue)? What variables are you expecting to show up? Are you writing other values in the env file after touching it? If not, since it’s empty, I wouldn’t expect it to provide any additional values. Sorry for all the questions, just trying to understand the scenario better and see what could be going on and how to fix it. |
Beta Was this translation helpful? Give feedback.
-
Solution found, Basically you have to set up a debug profile, running the program using the integrated terminal will not source the .env file |
Beta Was this translation helpful? Give feedback.
@LeptoFlare you can find the docs at devcontainer.json reference.
Here’s the description for the
initializeCommand