File tree Expand file tree Collapse file tree 7 files changed +54
-13
lines changed
Expand file tree Collapse file tree 7 files changed +54
-13
lines changed Original file line number Diff line number Diff line change @@ -27,11 +27,11 @@ Create a new directory with the server name and add a `ContainerFile`:
2727``` dockerfile
2828# Example ContainerFile for a Node.js based LSP server
2929ARG VERSION=1.0.0
30- FROM node:22-slim AS builder
30+ FROM docker.io/library/ node:22-slim AS builder
3131ARG VERSION
3232RUN npm install -g <package-name>@${VERSION}
3333
34- FROM node:22-slim
34+ FROM docker.io/library/ node:22-slim
3535ARG VERSION
3636LABEL org.opencontainers.image.version="${VERSION}"
3737COPY --from=builder /usr/local/lib/node_modules /usr/local/lib/node_modules
@@ -104,8 +104,11 @@ The CI system will automatically:
104104
105105To manually test:
106106``` bash
107- # Build container
107+ # Build container (works with both Docker and Podman)
108+ # Podman will automatically pick up 'ContainerFile'
108109docker build -f container/< server-name> /ContainerFile -t lsp/< server-name> :latest .
110+ # or
111+ podman build -t lsp/< server-name> :latest container/< server-name> /
109112
110113# Test the container
111114docker run --rm lsp/< server-name> :latest --version
Original file line number Diff line number Diff line change 11# Deno has built-in LSP
22ARG VERSION=2.6.3
3- FROM denoland/deno:alpine-${VERSION}
3+ FROM docker.io/ denoland/deno:alpine-${VERSION}
44ARG VERSION
5- LABEL org.opencontainers.image.version="${VERSION}"
5+ LABEL org.opencontainers.image.title="Deno LSP" \
6+ org.opencontainers.image.description="Deno Language Server" \
7+ org.opencontainers.image.version="${VERSION}" \
8+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
9+ org.opencontainers.image.licenses="MIT"
610
711WORKDIR /workspace
12+ USER deno
813ENTRYPOINT ["deno", "lsp"]
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ ARG VERSION
55RUN uv tool install pyrefly==${VERSION}
66
77FROM gcr.io/distroless/cc-debian12
8+ ARG VERSION
9+ LABEL org.opencontainers.image.title="Pyrefly LSP" \
10+ org.opencontainers.image.description="Pyrefly Language Server" \
11+ org.opencontainers.image.version="${VERSION}" \
12+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
13+ org.opencontainers.image.licenses="MIT"
14+
815COPY --from=builder /usr/local/bin/pyrefly /usr/local/bin/pyrefly
916
1017WORKDIR /workspace
18+ USER 65532:65532
1119ENTRYPOINT ["/usr/local/bin/pyrefly", "lsp"]
Original file line number Diff line number Diff line change 11ARG VERSION=1.1.407
2- FROM node:22-alpine AS builder
2+ FROM docker.io/library/ node:22-alpine AS builder
33ARG VERSION
44WORKDIR /app
55RUN apk add --no-cache curl && \
@@ -8,12 +8,18 @@ RUN apk add --no-cache curl && \
88 npm prune --production && \
99 /usr/local/bin/node-prune
1010
11- FROM node:22-alpine
11+ FROM docker.io/library/ node:22-alpine
1212ARG VERSION
13- LABEL org.opencontainers.image.version="${VERSION}"
13+ LABEL org.opencontainers.image.title="Pyright LSP" \
14+ org.opencontainers.image.description="Pyright Language Server" \
15+ org.opencontainers.image.version="${VERSION}" \
16+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
17+ org.opencontainers.image.licenses="MIT"
18+
1419WORKDIR /app
1520COPY --from=builder /app/node_modules ./node_modules
1621ENV PATH="/app/node_modules/.bin:${PATH}"
1722
1823WORKDIR /workspace
24+ USER node
1925ENTRYPOINT ["pyright-langserver", "--stdio"]
Original file line number Diff line number Diff line change 11# Multi-stage build for rust-analyzer
22ARG VERSION=2025-12-15
3- FROM rust:slim-bookworm AS builder
3+ FROM docker.io/library/ rust:slim-bookworm AS builder
44ARG VERSION
55RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
66
@@ -18,10 +18,15 @@ RUN set -eux; \
1818
1919FROM gcr.io/distroless/cc-debian12
2020ARG VERSION
21- LABEL org.opencontainers.image.version="${VERSION}"
21+ LABEL org.opencontainers.image.title="rust-analyzer" \
22+ org.opencontainers.image.description="Rust Language Server" \
23+ org.opencontainers.image.version="${VERSION}" \
24+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
25+ org.opencontainers.image.licenses="MIT"
2226
2327COPY --from=builder /usr/local/bin/rust-analyzer /usr/local/bin/rust-analyzer
2428
2529WORKDIR /workspace
30+ USER 65532:65532
2631ENTRYPOINT ["/usr/local/bin/rust-analyzer"]
2732
Original file line number Diff line number Diff line change @@ -5,7 +5,15 @@ ARG VERSION
55RUN uv tool install ty@${VERSION}
66
77FROM gcr.io/distroless/cc-debian12
8+ ARG VERSION
9+ LABEL org.opencontainers.image.title="Ty LSP" \
10+ org.opencontainers.image.description="Ty Language Server" \
11+ org.opencontainers.image.version="${VERSION}" \
12+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
13+ org.opencontainers.image.licenses="MIT"
14+
815COPY --from=builder /usr/local/bin/ty /usr/local/bin/ty
916
1017WORKDIR /workspace
18+ USER 65532:65532
1119ENTRYPOINT ["/usr/local/bin/ty", "server"]
Original file line number Diff line number Diff line change 11ARG VERSION=5.1.3
2- FROM node:22-alpine AS builder
2+ FROM docker.io/library/ node:22-alpine AS builder
33ARG VERSION
44WORKDIR /app
55RUN apk add --no-cache curl && \
@@ -8,12 +8,18 @@ RUN apk add --no-cache curl && \
88 npm prune --production && \
99 /usr/local/bin/node-prune
1010
11- FROM node:22-alpine
11+ FROM docker.io/library/ node:22-alpine
1212ARG VERSION
13- LABEL org.opencontainers.image.version="${VERSION}"
13+ LABEL org.opencontainers.image.title="TypeScript LSP" \
14+ org.opencontainers.image.description="TypeScript Language Server" \
15+ org.opencontainers.image.version="${VERSION}" \
16+ org.opencontainers.image.source="https://github.com/wangbowei/lsp-client" \
17+ org.opencontainers.image.licenses="MIT"
18+
1419WORKDIR /app
1520COPY --from=builder /app/node_modules ./node_modules
1621ENV PATH="/app/node_modules/.bin:${PATH}"
1722
1823WORKDIR /workspace
24+ USER node
1925ENTRYPOINT ["typescript-language-server", "--stdio"]
You can’t perform that action at this time.
0 commit comments