I am trying to build a language server to be implemented as a sidecar for eclipse che. I built a fat jar from a xtext language server that I've created. Can I use this fat jar to implement my language server in a dockerfile in order to run my language server as a container?
I wrote a Dockerfile as below:
FROM barais/eclipse-xtend
ADD build/libs/dsl-language-server-ls.jar dsl-language-server-ls.jar
RUN sudo apt-get install socat
CMD socat TCP4-LISTEN:4417,reuseaddr,fork EXEC:"mydsl"
"dsl-language-server-ls.jar" is the jar file made by building my project (i.e, the LS). My question is, can I run my language server by including the .jar file as in the above dockerfile? It actually worked in eclipse che, but I still get a broken pipe error, and a timeout error which makes me doubt my approach.
Language Server Initialization Error
This is the error I'm getting.
this will only work if you package your docker image correctly
java -jar yourjar.jar
instead of the mydsl
startup script