lua-language-server icon indicating copy to clipboard operation
lua-language-server copied to clipboard

Need help with running lua lsp in a docker container

Open ankushKun opened this issue 1 year ago • 9 comments

Hi, this is what I am trying to do:

  • I have a web editor made with react and monaco editor
  • The editor is for writing lua code
  • I want lua lsp autocompletions in the web editor
  • I am trying to run the lua-language-server in a docker container which I hope to later run on a VPS and make the editor frontend connect to this remote lsp server to provide autocompletions

Setup:

  • I used the homebrew docker image to install lua-language-server https://hub.docker.com/r/homebrew/brew

Issue faced:

When I run just the lua-language-server command, it seems to be running, but when I specify a socket, it does not start and gives a connection refused error.

image

image

moreover when I install the lsp on my mac machine and run the same command, it doesnot throw and error and seems to run silently

image

If anyone needs any additional details please let me know

Dockerfile:

# Use the official Homebrew Docker image as the base
FROM homebrew/brew:latest

# Install lua-language-server
RUN brew install lua-language-server

# Verify installation
RUN lua-language-server --version

# Set working directory
WORKDIR /workspace

# ENTRYPOINT ["lua-language-server --socket=5000"]

# CMD ["lua-language-server", "--socket=5000"]

EXPOSE 5000

CMD ["bash"]

tried both ENTRYPOINT and CMD, same results, which is why I used bash and interactive mode to debug

Thanks

ankushKun avatar Jun 19 '24 05:06 ankushKun