tgrospic / rholang-vscode

Rholang extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=tgrospic.rholang
MIT License
9 stars 6 forks source link

Add docker commands setting option #3

Open arthurgreef opened 4 years ago

arthurgreef commented 4 years ago

Hi - it would be great if we could add additional docker commands when the extension runs rnode from a container. For example, I implemented the http extension you wrote and I would like to call a server running on the host machine. I can use http://host.docker.internal but I'd prefer to use http://127.0.0.1 as that is what I use when I deploy to my network that does not use containers. Thanks.

Use --network="host" in your docker run command, then 127.0.0.1 in your docker container will point to your docker host.

Note: This mode only works on Docker for Linux, per the documentation.

tgrospic commented 4 years ago

Hi Arthur! Your request totally makes sense. Even more the goal is to have another option for running RNode with the extension and this is just connecting to existing instance running externally where you have the full control.

Currently the main limitation (or complication) is that repl API can not give the output to the caller and also some parsing errors are written to standard output/error. This makes it much harder to create some simple interface to connection to external node. My idea is to use something like .rholangrc file which can serve as project based configuration for editors and other tools where we can have much more freedom and customization options. Extension should be as thin as possible so that we can use it on the web with the same experience.

For now, I'll add new settings option to enter additional Docker run command arguments. :+1: