docker container of solargraph server for Visual Studio Code
Install the docker engine in a way that suits your execution environment. Docker Engine
- Build docker image
$ cp YOUR_PROJECT_FOLDER/Gemfile YOUR_PROJECT_FOLDER/Gemfile.lock .
$ docker build -t vscode-solargraph:latest .
If you want to specify the ruby version, let's specify it with arg as follows
$ docker build -t vscode-solargraph:latest --build-arg RUBY_VERSION="x.x.x" .
- Start docker container
$ docker run -d --rm -p 8091:7658 --name solargraph vscode-solargraph
- Setup Visual Studio Code
- Install VSCode Solargraph Extension
- Add the following to settings.json
"solargraph.transport": "external",
"solargraph.externalServer": {
"host": "localhost",
"port": 8091
}