vscode-remote-release icon indicating copy to clipboard operation
vscode-remote-release copied to clipboard

Add option to control docker-compose working directory

Open edwinhuish opened this issue 1 year ago • 5 comments

  • VSCode Version: 1.70.2
  • Local OS Version: WIN11 (Window_NT x64 10.0.22000)
  • Remote OS Version: WSL2
  • Remote Extension/Connection Type: WSL
  • Logs:

Steps to Reproduce:

  1. project root with any .env file in INI format (with section name)
  2. config dev container as docker-compose mode, build or rebuild the container.

Does this issue occur when you try this locally?: Yes Does this issue occur when you try this locally and all extensions are disabled?: Yes

Why it happen:

vscode run docker-compose version in the project root, but docker-compose read .env as default, and the project root .env not a valid docker-compose env file.

edwinhuish avatar Sep 01 '22 00:09 edwinhuish

This appears to be a limitation of Docker Compose and is not related to VS Code / Remote-Containers, correct? If you would like Docker Compose to support INI file format, I suggest to file a feature request for Docker Compose and close this issue.

chrmarti avatar Sep 06 '22 07:09 chrmarti

This appears to be a limitation of Docker Compose and is not related to VS Code / Remote-Containers, correct? If you would like Docker Compose to support INI file format, I suggest to file a feature request for Docker Compose and close this issue.

As the docker files of dev container are in sub folder .devcontainer, if dev container run docker-compose command under .devcontainer with solve the problem.

PS: the .env file in the root path is used by the project, so I can't change or remove it.

edwinhuish avatar Sep 06 '22 08:09 edwinhuish

We can't change the default working directory as that would break existing setups that rely on the .env file being read. We could instead introduce an option in the devcontainer.json to control the working directory. Marking as feature request.

chrmarti avatar Sep 07 '22 07:09 chrmarti

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 10 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

VSCodeTriageBot avatar Sep 07 '22 07:09 VSCodeTriageBot

We can't change the default working directory as that would break existing setups that rely on the .env file being read. We could instead introduce an option in the devcontainer.json to control the working directory. Marking as feature request.

I saw there is a docker-compose version command in the beginning, I think you could cd to .devcontainer and return back to root directory.

edwinhuish avatar Sep 07 '22 07:09 edwinhuish

This feature request has not yet received the 10 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding

VSCodeTriageBot avatar Oct 28 '22 03:10 VSCodeTriageBot