bufbuild/vscode-buf

Docker support

Closed this issue · 2 comments

d-luk commented

My buf binary is installed on Docker (because I'm running Windows), so I tried setting the buf.binaryPath setting to docker run --volume "$(pwd):/workspace" --workdir /workspace bufbuild/buf but it gives me the following error:

Failed to get buf version: spawnSync docker run --volume "$(pwd):/workspace" --workdir /workspace bufbuild/buf ENOENT

Is there any way to configure the plugin to allow this?

Hi Duncan, thanks for your issue! This is currently not supported, as you can tell (I hadn't actually tried it), we give the binaryPath configuration straight to the node child_process spawnSync method, so it expects a file. I'm not sure what would be required to get it working with Docker, but maybe as a workaround you can write a script (powershell?) that proxies the parameters to the docker container?

We're unlikely to add support as we intend to add support for running buf natively on windows eventually.

d-luk commented

Thanks for your reply @johanbrandhorst. I have solved this by using a dev container.