MATLAB-extension-for-vscode icon indicating copy to clipboard operation
MATLAB-extension-for-vscode copied to clipboard

Using matlab from a docker container

Open diegoferigo opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe.

I'd like to use Matlab included in a docker container, like those that can be instantiated using mathworks-ref-arch/matlab-dockerfile.

Currently, this extension expects Matlab to be installed in the host OS.

Screenshot_20230922_150159

Describe the solution you'd like

I'd like vscode to use Matlab included in a docker container running in my system.

diegoferigo avatar Sep 22 '23 13:09 diegoferigo

Thanks for your enhancement request. Have you considered using a setup like https://code.visualstudio.com/docs/remote/ssh ? You would be including a VS Code IDE and MATLAB extension on your Docker container and then use VS Code's SSH extension to remote into the docker container. would that work for you?

hamidingit avatar Sep 23 '23 02:09 hamidingit

Thanks @hamidingit for your input! That is similar to my current setup, in which I install VS Code inside the Docker image. The only difference is that, being on the same machine, I use directly the host's X server by creating a matching user and sharing the resources for X11 authentication.

While these two solutions work perfectly fine, I was wondering with this feature request if a setup based on Dev Containers (docs) would be supported anytime in the future. Right now, even if the MATLAB extension is configured to be installed inside the dev container, it is not able to find the included matlab installation and provide full hints.

Edit: I forgot to mention that I'm already on a GNU/Linux system, and my setup works only if this is the case, contrarily to the ssh option.

diegoferigo avatar Sep 23 '23 09:09 diegoferigo