Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [orion-dev] Using Docker to test Orion's LSP support...

Hey Remy,

I'm running it now. Nice to see the syntax errors happen when you get line breaks and other things wrong. Great work!


Inactive hide details for Remy Suen ---2017/07/17 06:32:18 AM---Hi all, For the past month or two I've been toiling over DockerRemy Suen ---2017/07/17 06:32:18 AM---Hi all, For the past month or two I've been toiling over Docker, Orion, the

From: Remy Suen <remy.suen@xxxxxxxxx>
To: Orion developer discussions <orion-dev@xxxxxxxxxxx>
Date: 2017/07/17 06:32 AM
Subject: [orion-dev] Using Docker to test Orion's LSP support...
Sent by: orion-dev-bounces@xxxxxxxxxxx

Hi all,

For the past month or two I've been toiling over Docker, Orion, the
Java LSP server, and the language server protocol. After some
investigations, I began working on a language server for Dockerfiles.
It's licensed under MIT and is on GitHub if anyone fancies a gander.

Anyway, since the end goal of Orion's LSP support is to obviously
connect to more than just the Java LSP server, I did some poking and
hacking and got it to connect to my Dockerfile language server.

If anyone wants to give it a try, you can follow these (hopefully)
simple steps below. And don't worry about setting up and downloading
random dependencies. You can try it out with just a browser thanks to!


1. Go to and start a session. Of course, you can
also do this on your own Docker instance or just clone my branch and
npm install yourself and so on. Whatever works for you.

2. > vim Dockerfile

3. Copy/paste the following content.


FROM node:6

RUN mkdir /opt/orion && \
git clone --depth 1 -b docker-lsp /opt/orion && \
cd /opt/orion/modules/orionode && \
npm install && \
npm install dockerfile-language-server-nodejs

CMD [ "node", "/opt/orion/modules/orionode/server.js", "-w", "/opt/orion" ]


4. > docker build -t orion/docker-lsp .

5. Alt+Tab and do real work. Shouldn't take that long.

6. Alt+Tab back when you want to play.

7. > docker run -d -p orion/docker-lsp

8. After the container has started, you should see an 8081 link at the
top of your page. Open it in a new tab.

9. You now have Orion running and pointing at the cloned orion.client

10. Create a Dockerfile and have fun!


Working features in Orion LSP:
- formatting
- open declaration (for build stage names and ARG/ENV variables)
- read/write mark occurrences highlighting (for build stage names and
ARG/ENV variables)
- hovers (instructions and ARG/ENV variable values)
- warnings/error markers (try typing in non-existent instructions or
writing instructions in lowercase)
- code completion (often gets into hiccups and doesn't suggest
anything, but basically the same as what's in Orion 15.0 right now so
perhaps not that exciting)
- outline with Ctrl+O

Missing features in Orion LSP:
- rename (for build stage names and ARG/ENV variables)
- quick fixes via code actions
- and some other stuff that my Dockerfile server doesn't actually
support like code lens and so on


Doing testing with both the Java LSP server and my Dockerfile LSP
server has been great as I've been able to find various little bugs in
Orion's LSP client implementation due to Orion not conforming to the
spec enough.

With some small tweaks I imagine you can reuse my Orion Node IPC
bridge code (that I've almost directly copy/pasted from Olivier's Java
server bridge code) to connect to other language servers written with
the vscode-languageserver node module.

Feel free to let me know if you have any questions or comments. I also
hang out on the Eclipse Mattermost server on the Orion and channels if you want to reach out to me there.

orion-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top