feat(docker): add Dockerfile and servers.yml for clangd LSP setup

This commit is contained in:
ngc2207 2025-01-05 00:41:04 +08:00
parent c9ac19694b
commit c7af4dbcde
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,25 @@
FROM alpine:latest as builder
RUN apk add --no-cache git npm
WORKDIR /app
RUN git clone https://github.com/wylieconlon/jsonrpc-ws-proxy.git
WORKDIR /app/jsonrpc-ws-proxy
COPY servers.yml .
RUN npm install && npm run prepare
FROM alpine:latest
RUN apk add --no-cache build-base clang-extra-tools nodejs
WORKDIR /app/jsonrpc-ws-proxy
COPY --from=builder /app/jsonrpc-ws-proxy .
EXPOSE 3000
CMD ["node", "dist/server.js", "--port", "3000", "--languageServers", "servers.yml"]

View File

@ -0,0 +1,5 @@
langservers:
clangd:
- /usr/bin/clangd
- --log=verbose
- --background-index