fix: update Docker configuration for clangd services and adjust port mappings

This commit is contained in:
ngc2207 2025-01-10 18:35:18 +08:00
parent f7f1e01b72
commit 104e66d4d0
2 changed files with 14 additions and 19 deletions

View File

@ -40,7 +40,7 @@ services:
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "22:22"
- "2222:22"
depends_on:
postgres:
condition: service_healthy
@ -48,8 +48,8 @@ services:
lsp-c:
image: clangd:latest
build:
context: ./lsp/clangd
dockerfile: Dockerfile
context: ./lsp
dockerfile: clangd/Dockerfile
container_name: lsp-c
restart: always
ports:
@ -58,8 +58,8 @@ services:
lsp-cpp:
image: clangd:latest
build:
context: ./lsp/clangd
dockerfile: Dockerfile
context: ./lsp
dockerfile: clangd/Dockerfile
container_name: lsp-cpp
restart: always
ports:

View File

@ -1,24 +1,19 @@
FROM alpine:latest as builder
FROM alpine:3.21
RUN apk add --no-cache git npm
RUN echo "https://mirror.nju.edu.cn/alpine/v3.21/main" > /etc/apk/repositories && \
echo "https://mirror.nju.edu.cn/alpine/v3.21/community" >> /etc/apk/repositories
RUN apk add --no-cache git npm build-base clang-extra-tools nodejs
RUN npm config set registry https://registry.npmmirror.com
WORKDIR /app
RUN git clone https://github.com/wylieconlon/jsonrpc-ws-proxy.git
COPY jsonrpc-ws-proxy ./jsonrpc-ws-proxy
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 .
COPY clangd/servers.yml .
EXPOSE 3000