James-Yu / LaTeX-Workshop

Boost LaTeX typesetting efficiency with preview, compile, autocomplete, colorize, and more.
MIT License
10.47k stars 519 forks source link

Customize docker (or podman) path #4222

Closed themagiulio closed 1 month ago

themagiulio commented 4 months ago

Currently LaTeX Workshop supports only docker and it expects to have it in PATH. This small PR addresses this problem by creating a new config docker.path allowing the user to customize the location of docker.

This config makes also possible to use podman, a drop-in replacement of docker as explained in #1130, by setting docker.path to podman.

My commits makes this to work only in GNU/Linux and macOS as I modified only the bash scripts. Modifying the powershell scripts would make this fix available to Windows users as well.

James-Yu commented 4 months ago

Thank you for your contribution. I vote a yes to this PR.

My commits makes this to work only in GNU/Linux and macOS as I modified only the bash scripts.

This is the remaining concern. Generally, we'd like to avoid platform-specific configs. Any solution?

themagiulio commented 4 months ago

Thank you for creating this great extension.

This is the remaining concern. Generally, we'd like to avoid platform-specific configs. Any solution?

We just need to edit the bat files to invoke the program specified by the env variable LATEXWORKSHOP_DOCKER_PATH instead of docker. I am not a Windows user and I have never tinkered with bat files. The change should be simple to apply, but I don't know the syntax.