Add LSP Dockerfiles for bash, docker, and marksman

- bash-language-server: Prebuilt npm package (190MB)
- docker-language-server: Multi-stage Go build (49.2MB)
- marksman: Debian with libicu72 for .NET runtime (144MB)
- All configured for Crush via stdio communication
This commit is contained in:
2026-01-21 19:19:37 -05:00
parent add39a2671
commit cfca7e6342
3 changed files with 51 additions and 8 deletions

View File

@@ -2,12 +2,9 @@ FROM node:22-alpine
WORKDIR /app
COPY package.json package-lock.json* ./
# Install prebuilt bash-language-server from npm
RUN npm install -g bash-language-server
RUN npm ci
COPY . .
RUN npm run build
CMD ["node", "dist/index.js"]
# Set entrypoint
ENTRYPOINT ["bash-language-server"]
CMD ["start"]

View File

@@ -0,0 +1,32 @@
# syntax=docker/dockerfile:1
ARG GO_VERSION="1.25"
ARG ALPINE_VERSION="3.22"
FROM golang:${GO_VERSION}-alpine${ALPINE_VERSION} AS builder
WORKDIR /src
# Copy go files
COPY go.mod go.sum ./
# Download dependencies
RUN go mod download
# Copy source code
COPY . .
# Build of binary
RUN CGO_ENABLED=0 GOOS=linux go build -o docker-language-server ./cmd/docker-language-server
# Runtime stage
FROM alpine:${ALPINE_VERSION}
WORKDIR /app
# Copy binary from builder
COPY --from=builder /src/docker-language-server /usr/local/bin/
# Set entrypoint to run LSP server
ENTRYPOINT ["docker-language-server"]
CMD ["start", "--stdio"]

View File

@@ -0,0 +1,14 @@
FROM debian:bookworm-slim
WORKDIR /app
# Install dependencies (wget and icu-libs for marksman)
RUN apt-get update && apt-get install -y wget libicu72 && \
wget -O /usr/local/bin/marksman \
https://github.com/artempyanykh/marksman/releases/download/2025-12-13/marksman-linux-x64 \
&& chmod +x /usr/local/bin/marksman && \
apt-get clean && rm -rf /var/lib/apt/lists/*
# Set entrypoint to run LSP server
ENTRYPOINT ["marksman"]
CMD ["server"]