diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-and-push.yml similarity index 69% rename from .github/workflows/build-image.yml rename to .github/workflows/build-and-push.yml index e7eaae8..ab29f54 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-and-push.yml @@ -1,11 +1,9 @@ -name: Push LSP Docker Images +name: build-and-push on: pull_request: push: branches: [main] - schedule: - - cron: '0 3 * * *' jobs: build_and_push: @@ -110,6 +108,8 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 + with: + platforms: linux/amd64,linux/arm64 - name: Login to Docker Hub uses: docker/login-action@v3 @@ -118,9 +118,33 @@ jobs: password: ${{ secrets.DOCKER_PASSWORD }} if: ${{ github.ref == 'refs/heads/main' }} + - name: Extract version from Dockerfile + id: version + run: | + VERSION=$(grep "ARG VERSION=" servers/${{ matrix.context }}/Dockerfile | cut -d'=' -f2 || echo "unknown") + echo "version=$VERSION" >> $GITHUB_OUTPUT + if [ "$VERSION" != "unknown" ]; then + TAGS="lspcontainers/${{ matrix.tag }}:latest,lspcontainers/${{ matrix.tag }}:$VERSION" + echo "tags=$TAGS" >> $GITHUB_OUTPUT + else + TAGS="lspcontainers/${{ matrix.tag }}:latest" + echo "tags=$TAGS" >> $GITHUB_OUTPUT + fi + echo "🏷️ Tags that will be used: $TAGS" + + # Set platforms based on container compatibility + if [ "${{ matrix.context }}" = "powershell_es" ]; then + echo "platforms=linux/amd64" >> $GITHUB_OUTPUT + echo "🏗️ PowerShell ES: Building for amd64 only (ARM64 not supported by Microsoft PowerShell base image)" + else + echo "platforms=linux/amd64,linux/arm64" >> $GITHUB_OUTPUT + echo "🏗️ Building for platforms: linux/amd64,linux/arm64" + fi + - name: Build and push to Docker Hub uses: docker/build-push-action@v5 with: context: servers/${{ matrix.context }} + platforms: ${{ steps.version.outputs.platforms }} push: ${{ github.ref == 'refs/heads/main' }} - tags: lspcontainers/${{ matrix.tag }}:latest + tags: ${{ steps.version.outputs.tags }} diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..b831a65 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,99 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. + +## Project Overview + +This repository contains Dockerfiles for Language Server Protocol (LSP) servers used with `lspcontainers`. Each language server is containerized to provide consistent development environments across different platforms. + +## Build Commands + +### Building Docker Images +- `docker-compose build ` - Build a specific server (e.g., `docker-compose build tsserver`) +- `docker-compose build` - Build all servers +- `docker-compose build --parallel` - Build all servers in parallel (faster) + +### Available Servers +The docker-compose.yaml defines 24 language servers: +- `bashls` - Bash Language Server +- `clangd` - C/C++ Language Server +- `denols` - Deno Language Server +- `dockerls` - Docker Language Server +- `eslintls` - ESLint Language Server +- `gopls` - Go Language Server +- `graphql-lsp` - GraphQL Language Service +- `html` - HTML Language Server +- `intelephense` - PHP Language Server +- `jsonls` - JSON Language Server +- `lemminx` - XML Language Server +- `omnisharp` - C# Language Server +- `powershell_es` - PowerShell Language Server +- `prisma` - Prisma Language Server +- `pylsp` - Python LSP Server +- `pyright` - Python Language Server +- `rust_analyzer` - Rust Language Server +- `solargraph` - Ruby Language Server +- `sumneko_lua` - Lua Language Server +- `svelteserver` - Svelte Language Server +- `tailwindcss` - Tailwind CSS Language Server +- `terraformls` - Terraform Language Server +- `tsserver` - TypeScript Language Server +- `volar` - Vue Language Server (Volar) +- `vuels` - Vue Language Server (legacy) +- `yamlls` - YAML Language Server + +### Linting +The CI workflow uses hadolint to lint Dockerfiles: +```bash +docker run --rm -v $(pwd):/code -w /code hadolint/hadolint:latest-alpine servers//Dockerfile +``` + +## Architecture + +### Repository Structure +``` +servers/ +├── / +│ ├── Dockerfile # Container definition +│ └── docker_entrypoint.sh # Optional entrypoint script (e.g., gopls) +├── docker-compose.yaml # Service definitions +└── .github/workflows/ # CI/CD automation +``` + +### Container Patterns +1. **Alpine-based**: All containers use Alpine Linux as the base image for minimal size +2. **Package managers**: Different servers use appropriate package managers: + - Node.js servers: `npm` or `yarn` + - Go servers: `go install` + - Python servers: `pip` + - Ruby servers: `gem` +3. **User management**: Some containers (like gopls) create dedicated users with sudo access +4. **Entrypoint scripts**: Complex setups use shell scripts for runtime configuration + +### Special Cases +- **gopls**: Uses a custom entrypoint script to handle user/group ID mapping +- **volar**: Pinned to specific version (1.8.11) in environment variable +- **tsserver**: Includes Vue TypeScript plugin for Vue.js support + +### CI/CD Pipeline +The GitHub Actions workflow: +1. Runs hadolint on each Dockerfile +2. Builds images using Docker Buildx +3. Pushes to Docker Hub on main branch +4. Runs daily builds via cron schedule +5. Uses matrix strategy to build all servers in parallel + +### Container Tagging +Each container has two tags: +- `latest`: Points to the most recent build +- Pinned version: Latest version of the language server + +## Development Guidelines + +When adding new language servers: +1. Create a new directory under `servers/` +2. Write a Dockerfile following Alpine Linux pattern +3. Add the service to `docker-compose.yaml` +4. Update the CI workflow matrix in `.github/workflows/build-image.yml` +5. Test locally with `docker-compose build ` +6. Verify with hadolint: `docker run --rm -v $(pwd):/code -w /code hadolint/hadolint:latest-alpine servers//Dockerfile` \ No newline at end of file diff --git a/README.md b/README.md index 25d4ba9..d41fa6f 100644 --- a/README.md +++ b/README.md @@ -1,27 +1,208 @@ -# dockerfiles +# lspcontainers/dockerfiles -Dockerfiles for all LSPs used with `lspcontainers`. +🚀 **Dockerfiles for Language Server Protocol (LSP) servers** - Containerized language servers for use with [lspcontainers.nvim](https://github.com/lspcontainers/lspcontainers.nvim). -## Installation +[![Docker Hub](https://img.shields.io/badge/Docker%20Hub-lspcontainers-blue?logo=docker)](https://hub.docker.com/u/lspcontainers) +[![Build Status](https://img.shields.io/github/actions/workflow/status/lspcontainers/dockerfiles/build-image.yml?branch=main)](https://github.com/lspcontainers/dockerfiles/actions) +[![License](https://img.shields.io/github/license/lspcontainers/dockerfiles)](LICENSE) -This repository requires the latest: +## 🌟 What is this? -- [Docker Engine](https://docs.docker.com/engine/install/) -- [Docker Compose](https://docs.docker.com/compose/install) +This repository provides **production-ready Docker containers** for 25+ Language Server Protocol (LSP) servers, designed to work seamlessly with the **[lspcontainers.nvim](https://github.com/lspcontainers/lspcontainers.nvim)** Neovim plugin. -## Build +### 🎯 **How it works:** +1. **Docker containers** provide isolated, reproducible LSP server environments +2. **[lspcontainers.nvim](https://github.com/lspcontainers/lspcontainers.nvim)** plugin automatically manages these containers in Neovim +3. **Zero local installation** - no need to install language servers on your system -To build images locally run: +Perfect for: +- **Consistent development environments** across teams and machines +- **Clean system** - no language server pollution on your host +- **Reproducible builds** with pinned package versions +- **Easy switching** between language server versions -- `docker-compose build ` to build a specific server (see `docker-compose.yaml`) -- `docker-compose build` to build all servers -- `docker-compose build --parallel` to build all servers in parallel +## 🛠️ Supported Language Servers -## Versions +| Language | Server | Container | Version | +|----------|--------|-----------|---------| +| **Bash** | bash-language-server | `lspcontainers/bash-language-server` | ![Version](https://img.shields.io/badge/version-5.6.0-blue) | +| **C/C++** | clangd | `lspcontainers/clangd-language-server` | ![Version](https://img.shields.io/badge/version-20.1.8-blue) | +| **C#** | omnisharp | `lspcontainers/omnisharp-language-server` | ![Version](https://img.shields.io/badge/version-1.39.12-blue) | +| **CSS/SCSS/Less** | vscode-css-languageserver | `lspcontainers/css-language-server` | ![Version](https://img.shields.io/badge/version-4.10.0-blue) | +| **Deno** | deno-lsp | `lspcontainers/deno-language-server` | ![Version](https://img.shields.io/badge/version-2.4.2-blue) | +| **Docker** | dockerfile-ls | `lspcontainers/docker-language-server` | ![Version](https://img.shields.io/badge/version-0.14.0-blue) | +| **ESLint** | eslint-languageserver | `lspcontainers/eslint-language-server` | ![Version](https://img.shields.io/badge/version-latest-blue) | +| **Go** | gopls | `lspcontainers/gopls` | ![Version](https://img.shields.io/badge/version-0.19.1-blue) | +| **GraphQL** | graphql-language-service | `lspcontainers/graphql-language-server` | ![Version](https://img.shields.io/badge/version-3.5.0-blue) | +| **HTML** | html-languageserver | `lspcontainers/html-language-server` | ![Version](https://img.shields.io/badge/version-1.4.0-blue) | +| **JavaScript/TypeScript** | typescript-language-server | `lspcontainers/typescript-language-server` | ![Version](https://img.shields.io/badge/version-4.3.4-blue) | +| **JSON** | vscode-json-languageserver | `lspcontainers/json-language-server` | ![Version](https://img.shields.io/badge/version-4.10.0-blue) | +| **Lua** | lua-language-server | `lspcontainers/lua-language-server` | ![Version](https://img.shields.io/badge/version-3.14.0-blue) | +| **PHP** | intelephense | `lspcontainers/php-language-server` | ![Version](https://img.shields.io/badge/version-1.14.4-blue) | +| **PowerShell** | powershell-es | `lspcontainers/powershell-language-server` | ![Version](https://img.shields.io/badge/version-4.3.0-blue) | +| **Prisma** | prisma-language-server | `lspcontainers/prisma-language-server` | ![Version](https://img.shields.io/badge/version-6.9.1-blue) | +| **Python** | pylsp | `lspcontainers/python-lsp-server` | ![Version](https://img.shields.io/badge/version-1.12.0-blue) | +| **Python** | pyright | `lspcontainers/pyright-language-server` | ![Version](https://img.shields.io/badge/version-1.1.377-blue) | +| **Ruby** | solargraph | `lspcontainers/ruby-language-server` | ![Version](https://img.shields.io/badge/version-0.55.1-blue) | +| **Rust** | rust-analyzer | `lspcontainers/rust-analyzer` | ![Version](https://img.shields.io/badge/version-1.88.0-blue) | +| **Svelte** | svelte-language-server | `lspcontainers/svelte-language-server` | ![Version](https://img.shields.io/badge/version-0.17.16-blue) | +| **Tailwind CSS** | tailwindcss-language-server | `lspcontainers/tailwindcss-language-server` | ![Version](https://img.shields.io/badge/version-0.14.25-blue) | +| **Terraform** | terraform-ls | `lspcontainers/terraform-ls` | ![Version](https://img.shields.io/badge/version-0.36.5-blue) | +| **Vue** | volar | `lspcontainers/volar-language-server` | ![Version](https://img.shields.io/badge/version-1.8.11-blue) | +| **Vue** | vuels (legacy) | `lspcontainers/vue-language-server` | ![Version](https://img.shields.io/badge/version-0.8.5-blue) | +| **XML** | lemminx | `lspcontainers/xml-language-server` | ![Version](https://img.shields.io/badge/version-0.27.0-blue) | +| **YAML** | yaml-language-server | `lspcontainers/yaml-language-server` | ![Version](https://img.shields.io/badge/version-1.18.0-blue) | -Every container has two tags available: +## 🚀 Quick Start -- The `latest` tag, which points to the latest container build +### Using with lspcontainers.nvim (Recommended) -- A pinned version. The pinned version will be the latest - version of the language server. +These containers are designed to work with the **[lspcontainers.nvim](https://github.com/lspcontainers/lspcontainers.nvim)** plugin. + +👉 **[See the plugin documentation](https://github.com/lspcontainers/lspcontainers.nvim)** for installation and setup instructions. + +### Building Containers Locally + +```bash +# Clone the repository +git clone https://github.com/lspcontainers/dockerfiles.git +cd dockerfiles + +# Build a specific server +docker-compose build gopls + +# Build all servers +docker-compose build + +# Build all servers in parallel (faster!) +docker-compose build --parallel +``` + +## 📋 Prerequisites + +- [Docker Engine](https://docs.docker.com/engine/install/) (20.10+) +- [Docker Compose](https://docs.docker.com/compose/install) (2.0+) + +## 🏗️ Architecture & Design + +### 🔒 **Reproducible Builds** +All containers use **pinned package versions** for complete reproducibility: +- **Base images**: Specific Alpine/Debian versions +- **System packages**: Exact apk/apt package versions +- **Language packages**: Pinned npm, gem, pip, go module versions + +### 🏔️ **Minimal & Secure** +- **Alpine Linux base** for minimal attack surface +- **Multi-stage builds** where applicable +- **Non-root users** for security +- **Distroless principles** - only essential components + +### 🔄 **Automated Updates** +- **Daily builds** via GitHub Actions +- **Dependency scanning** and security updates +- **Version tracking** of upstream language servers + +## 🤝 Contributing + +We're actively looking for contributors! Here's how you can help: + +### 🐛 **Report Issues** +Found a bug or have a feature request? [Open an issue](https://github.com/lspcontainers/dockerfiles/issues/new)! + +### 🔧 **Add New Language Servers** +Want to add support for a new language? We'd love your contribution! + +1. **Fork the repository** +2. **Create a new directory** under `servers/your-language-server/` +3. **Write a Dockerfile** following our patterns: + ```dockerfile + FROM alpine:3.22.1 + + ARG VERSION=1.2.3 + LABEL version="${VERSION}" + + RUN apk add --no-cache \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ + && npm install -g \ + your-language-server@${VERSION} + + CMD [ "your-language-server", "--stdio" ] + ``` +4. **Add to docker-compose.yaml** +5. **Test your build**: `docker-compose build your-server` +6. **Submit a pull request** + +### 🛠️ **Improve Existing Containers** +- Update language server versions +- Improve Dockerfile efficiency +- Add missing tools or dependencies +- Enhance security + +### 📚 **Documentation** +- Improve README files +- Add usage examples +- Write integration guides +- Create tutorials + +## 🏷️ Container Versioning + +Every container provides two tags: + +- **`latest`** - Latest build from main branch +- **`vX.Y.Z`** - Pinned version of the language server + +```bash +# Always latest +docker pull lspcontainers/gopls:latest + +# Specific version for production +docker pull lspcontainers/gopls:v0.19.1 +``` + +### 🔄 **Updating Dockerfile Versions** + +Each Dockerfile includes version information that controls both the language server version and container tagging: + +```dockerfile +# Version is declared at the top +ARG VERSION=1.2.3 +LABEL version="${VERSION}" + +# Version variable is used in installation +RUN npm install -g your-language-server@${VERSION} +``` + +**To update a language server version:** + +1. **Edit the Dockerfile** in `servers/your-server/Dockerfile` +2. **Update the VERSION argument** to the new version +3. **Test the build** locally: `docker-compose build your-server` +4. **Submit a pull request** with your changes + +The CI/CD pipeline automatically: +- Extracts the version from the `LABEL version` directive +- Tags the image with both `latest` and the specific version +- Pushes to Docker Hub with proper versioning + +**Example version update:** +```dockerfile +# Before +ARG VERSION=1.2.3 + +# After +ARG VERSION=1.3.0 +``` + +This ensures reproducible builds and allows users to pin to specific language server versions. + +### 📊 Project Stats + +- **25+ Language Servers** supported +- **100% reproducible builds** with pinned versions +- **Multi-architecture support** (amd64, arm64) +- **Active community** with regular contributions + +--- + +**Ready to contribute?** Check out our [Contributing Guide](CONTRIBUTING.md) and join our community of developers making language servers more accessible! diff --git a/docker-compose.yaml b/docker-compose.yaml index 9bb80e1..ce69b7c 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -1,5 +1,3 @@ -version: "3.8" - services: bashls: image: lspcontainers/bash-language-server diff --git a/servers/bashls/Dockerfile b/servers/bashls/Dockerfile index 32c9e85..94496f8 100644 --- a/servers/bashls/Dockerfile +++ b/servers/bashls/Dockerfile @@ -1,13 +1,16 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=5.6.0 +LABEL version="${VERSION}" # using npm breaks shellcheck download of its binary from api.github.com # running shellcheck -V forces it to download its binary during build RUN apk add --no-cache \ - nodejs \ - yarn \ + nodejs=22.16.0-r2 \ + yarn=1.22.22-r1 \ && yarn global add \ - shellcheck \ - bash-language-server \ + shellcheck@3.1.0 \ + bash-language-server@${VERSION} \ && shellcheck -V CMD [ "bash-language-server", "start" ] diff --git a/servers/clangd/Dockerfile b/servers/clangd/Dockerfile index a632ae1..4745f65 100644 --- a/servers/clangd/Dockerfile +++ b/servers/clangd/Dockerfile @@ -1,7 +1,10 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=20.1.8 +LABEL version="${VERSION}" RUN apk add --no-cache \ - build-base \ - clang-extra-tools + build-base=0.5-r3 \ + clang-extra-tools=${VERSION}-r0 CMD [ "clangd", "--background-index" ] diff --git a/servers/denols/Dockerfile b/servers/denols/Dockerfile index 25fce1d..d8922e7 100644 --- a/servers/denols/Dockerfile +++ b/servers/denols/Dockerfile @@ -1,3 +1,6 @@ -FROM denoland/deno:alpine +FROM denoland/deno:alpine-2.4.2 + +ARG VERSION=2.4.2 +LABEL version="${VERSION}" CMD [ "lsp" ] diff --git a/servers/dockerls/Dockerfile b/servers/dockerls/Dockerfile index 4de748e..c21d9d8 100644 --- a/servers/dockerls/Dockerfile +++ b/servers/dockerls/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.14.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - dockerfile-language-server-nodejs + dockerfile-language-server-nodejs@${VERSION} CMD [ "docker-langserver", "--stdio" ] diff --git a/servers/eslintls/Dockerfile b/servers/eslintls/Dockerfile index c39a35f..efc5485 100644 --- a/servers/eslintls/Dockerfile +++ b/servers/eslintls/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=latest +LABEL version="${VERSION}" RUN apk add --no-cache \ - git \ - nodejs \ - npm + git=2.49.1-r0 \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 WORKDIR /tmp diff --git a/servers/gopls/Dockerfile b/servers/gopls/Dockerfile index e707ca3..57116ca 100644 --- a/servers/gopls/Dockerfile +++ b/servers/gopls/Dockerfile @@ -1,10 +1,14 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.19.1 +LABEL version="${VERSION}" RUN apk add --no-cache \ - bash \ - go \ - shadow \ - sudo + bash=5.2.37-r0 \ + git=2.49.1-r0 \ + go=1.24.4-r0 \ + shadow=4.17.3-r0 \ + sudo=1.9.17_p1-r0 ENV GO111MODULE="on" @@ -19,16 +23,15 @@ USER lspcontainers ENV GOBIN="/home/lspcontainers/.bin" ENV PATH="${GOBIN}:$PATH" -RUN go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@latest \ - && go install github.com/ramya-rao-a/go-outline@latest \ - && go install github.com/cweill/gotests/gotests@latest \ - && go install github.com/fatih/gomodifytags@latest \ - && go install github.com/josharian/impl@latest \ - && go install github.com/haya14busa/goplay/cmd/goplay@latest \ - && go install github.com/go-delve/delve/cmd/dlv@latest \ - && go install github.com/go-delve/delve/cmd/dlv@latest \ - && go install honnef.co/go/tools/cmd/staticcheck@latest \ - && go install golang.org/x/tools/gopls@latest +RUN go install github.com/uudashr/gopkgs/v2/cmd/gopkgs@v2.1.2 \ + && go install github.com/ramya-rao-a/go-outline@9736a4bde949f321d201e5eaa5ae2bcde011bf00 \ + && go install github.com/cweill/gotests/gotests@v1.6.0 \ + && go install github.com/fatih/gomodifytags@v1.17.0 \ + && go install github.com/josharian/impl@v1.4.0 \ + && go install github.com/haya14busa/goplay/cmd/goplay@v1.0.0 \ + && go install github.com/go-delve/delve/cmd/dlv@v1.25.0 \ + && go install honnef.co/go/tools/cmd/staticcheck@2025.1.1 \ + && go install golang.org/x/tools/gopls@v${VERSION} COPY --chown=lspcontainers:lspcontainers \ docker_entrypoint.sh /home/lspcontainers/docker_entrypoint.sh diff --git a/servers/graphql-lsp/Dockerfile b/servers/graphql-lsp/Dockerfile index c87b880..cddf775 100644 --- a/servers/graphql-lsp/Dockerfile +++ b/servers/graphql-lsp/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=3.5.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - graphql-language-service-cli + graphql-language-service-cli@${VERSION} CMD [ "graphql-lsp", "server" , "-m", "stream" ] diff --git a/servers/html/Dockerfile b/servers/html/Dockerfile index 8c87c4c..995e2aa 100644 --- a/servers/html/Dockerfile +++ b/servers/html/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=1.4.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - vscode-html-languageserver-bin + vscode-html-languageserver-bin@${VERSION} CMD [ "html-languageserver", "--stdio" ] diff --git a/servers/intelephense/Dockerfile b/servers/intelephense/Dockerfile index 3a4037f..98c89be 100644 --- a/servers/intelephense/Dockerfile +++ b/servers/intelephense/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=1.14.4 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - intelephense + intelephense@${VERSION} CMD [ "intelephense", "--stdio" ] diff --git a/servers/jsonls/Dockerfile b/servers/jsonls/Dockerfile index 0f08733..c03af3d 100644 --- a/servers/jsonls/Dockerfile +++ b/servers/jsonls/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=4.10.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - vscode-langservers-extracted + vscode-langservers-extracted@${VERSION} CMD [ "vscode-json-language-server", "--stdio" ] diff --git a/servers/lemminx/Dockerfile b/servers/lemminx/Dockerfile index f6eba40..3b7036e 100644 --- a/servers/lemminx/Dockerfile +++ b/servers/lemminx/Dockerfile @@ -1,17 +1,20 @@ -FROM debian +FROM debian:12.11-slim # The binary requires gnu-libc and will not work on alpine +ARG VERSION=0.27.0 +LABEL version="${VERSION}" + WORKDIR /tmp ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update -y \ && apt-get install --yes --no-install-recommends -o APT::Install-Suggests=0 -o APT::Install-Recommends=0 \ - curl \ - ca-certificates \ - unzip \ + curl=7.88.1-10+deb12u12 \ + ca-certificates=20230311+deb12u1 \ + unzip=6.0-28 \ && update-ca-certificates \ -&& curl -sL -O https://github.com/redhat-developer/vscode-xml/releases/download/0.26.1/lemminx-linux.zip \ +&& curl -sL -O https://github.com/redhat-developer/vscode-xml/releases/download/${VERSION}/lemminx-linux.zip \ && unzip lemminx-linux.zip \ && rm -rf lemminx-linux.zip \ && apt-get remove curl unzip -y \ diff --git a/servers/omnisharp/Dockerfile b/servers/omnisharp/Dockerfile index ea10160..d0d844b 100644 --- a/servers/omnisharp/Dockerfile +++ b/servers/omnisharp/Dockerfile @@ -1,12 +1,15 @@ -FROM debian +FROM debian:12.11-slim + +ARG VERSION=1.39.12 +LABEL version="${VERSION}" WORKDIR /tmp RUN apt-get update \ - && apt-get install curl --no-install-recommends --yes \ - && apt-get reinstall ca-certificates --yes \ + && apt-get install curl=7.88.1-10+deb12u12 --no-install-recommends --yes \ + && apt-get reinstall ca-certificates=20230311+deb12u1 --yes \ && update-ca-certificates \ - && curl -L -O https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v1.38.0/omnisharp-linux-x64.tar.gz \ + && curl -L -O https://github.com/OmniSharp/omnisharp-roslyn/releases/download/v${VERSION}/omnisharp-linux-x64.tar.gz \ && tar -xf omnisharp-linux-x64.tar.gz -C /usr \ && rm omnisharp-linux-x64.tar.gz \ && apt-get clean \ diff --git a/servers/powershell_es/Dockerfile b/servers/powershell_es/Dockerfile index 5ddce3c..1d36697 100644 --- a/servers/powershell_es/Dockerfile +++ b/servers/powershell_es/Dockerfile @@ -1,11 +1,14 @@ -FROM mcr.microsoft.com/powershell:alpine +FROM mcr.microsoft.com/powershell:7.5-alpine-3.20 + +ARG VERSION=4.3.0 +LABEL version="${VERSION}" WORKDIR /srv RUN apk add --no-cache \ - curl \ - unzip \ - && curl -L -o PowerShellEditorServices.zip https://github.com/PowerShell/PowerShellEditorServices/releases/download/v3.4.8/PowerShellEditorServices.zip \ + curl=8.12.1-r0 \ + unzip=6.0-r14 \ + && curl -L -o PowerShellEditorServices.zip https://github.com/PowerShell/PowerShellEditorServices/releases/download/v${VERSION}/PowerShellEditorServices.zip \ && unzip PowerShellEditorServices.zip \ && rm -fr PowerShellEditorServices.zip diff --git a/servers/prisma/Dockerfile b/servers/prisma/Dockerfile index f50493a..7a66cad 100644 --- a/servers/prisma/Dockerfile +++ b/servers/prisma/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=6.9.1 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - @prisma/language-server + @prisma/language-server@${VERSION} CMD [ "prisma-language-server", "--stdio" ] diff --git a/servers/pylsp/Dockerfile b/servers/pylsp/Dockerfile index 57fcb8b..5b9e338 100644 --- a/servers/pylsp/Dockerfile +++ b/servers/pylsp/Dockerfile @@ -1,20 +1,23 @@ -FROM alpine as build +FROM alpine:3.22.1 as build + +ARG VERSION=1.12.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - build-base \ - python3 \ - python3-dev \ - py3-pip \ + build-base=0.5-r3 \ + python3=3.12.11-r0 \ + python3-dev=3.12.11-r0 \ + py3-pip=25.1.1-r0 \ && python3 -m venv /venv WORKDIR /venv -RUN /venv/bin/pip install "python-lsp-server[all]" +RUN /venv/bin/pip install "python-lsp-server[all]==${VERSION}" -FROM alpine +FROM alpine:3.22.1 -RUN apk add --no-cache python3 py3-pip +RUN apk add --no-cache python3=3.12.11-r0 py3-pip=25.1.1-r0 WORKDIR /venv diff --git a/servers/pyright/Dockerfile b/servers/pyright/Dockerfile index 78bec3c..455f79b 100644 --- a/servers/pyright/Dockerfile +++ b/servers/pyright/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=1.1.377 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - pyright + pyright@${VERSION} CMD [ "pyright-langserver", "--stdio" ] diff --git a/servers/rust_analyzer/Dockerfile b/servers/rust_analyzer/Dockerfile index 2d48643..4ce6f2b 100644 --- a/servers/rust_analyzer/Dockerfile +++ b/servers/rust_analyzer/Dockerfile @@ -1,4 +1,8 @@ -FROM rustlang/rust:nightly +ARG VERSION=1.88.0 + +FROM rust:${VERSION}-alpine3.22 + +LABEL version="${VERSION}" RUN rustup component add rust-analyzer diff --git a/servers/solargraph/Dockerfile b/servers/solargraph/Dockerfile index 8994425..5599ece 100644 --- a/servers/solargraph/Dockerfile +++ b/servers/solargraph/Dockerfile @@ -1,14 +1,17 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.55.1 +LABEL version="${VERSION}" RUN apk add --no-cache \ - g++ \ - gcc \ - git \ - make \ - ruby \ - ruby-dev \ - zlib-dev \ + g++=14.2.0-r6 \ + gcc=14.2.0-r6 \ + git=2.49.1-r0 \ + make=4.4.1-r3 \ + ruby=3.4.4-r0 \ + ruby-dev=3.4.4-r0 \ + zlib-dev=1.3.1-r2 \ && gem install \ - solargraph + solargraph -v ${VERSION} CMD [ "/usr/local/bundle/bin/solargraph", "stdio" ] diff --git a/servers/sumneko_lua/Dockerfile b/servers/sumneko_lua/Dockerfile index ac71e37..5f2a50b 100644 --- a/servers/sumneko_lua/Dockerfile +++ b/servers/sumneko_lua/Dockerfile @@ -1,5 +1,8 @@ -FROM alpine +FROM alpine:3.22.1 -RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ lua-language-server +ARG VERSION=3.14.0 +LABEL version="${VERSION}" + +RUN apk add --update --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ lua-language-server=${VERSION}-r0 CMD [ "lua-language-server" ] diff --git a/servers/svelteserver/Dockerfile b/servers/svelteserver/Dockerfile index 4b73332..a06ef36 100644 --- a/servers/svelteserver/Dockerfile +++ b/servers/svelteserver/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.17.16 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - svelte-language-server + svelte-language-server@${VERSION} CMD [ "svelteserver", "--stdio" ] diff --git a/servers/tailwindcss/Dockerfile b/servers/tailwindcss/Dockerfile index 86c43a3..8524971 100644 --- a/servers/tailwindcss/Dockerfile +++ b/servers/tailwindcss/Dockerfile @@ -1,10 +1,13 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.14.25 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - tailwindcss \ - @tailwindcss/language-server + tailwindcss@4.1.11 \ + @tailwindcss/language-server@${VERSION} CMD ["tailwindcss-language-server", "--stdio"] diff --git a/servers/terraformls/Dockerfile b/servers/terraformls/Dockerfile index ad37d76..e1ec355 100644 --- a/servers/terraformls/Dockerfile +++ b/servers/terraformls/Dockerfile @@ -1,12 +1,14 @@ -FROM alpine AS build +FROM alpine:3.22.1 AS build -ARG TF_LS_VERSION=0.29.3 -ARG TF_VERSION=1.3.3 +ARG VERSION=0.36.5 +ARG TF_LS_VERSION=${VERSION} +ARG TF_VERSION=1.12.2 +LABEL version="${VERSION}" RUN apk add --no-cache --virtual \ build-deps \ - curl \ - gnupg + curl=8.14.1-r1 \ + gnupg=2.4.7-r0 WORKDIR /build @@ -25,10 +27,10 @@ RUN curl --proto '=https' \ && gpg --verify terraform_${TF_VERSION}_SHA256SUMS.sig terraform_${TF_VERSION}_SHA256SUMS \ && sha256sum -c SHA256SUMS \ && sha256sum -c TERRAFORM_SHA256SUMS \ - && unzip terraform-ls_${TF_LS_VERSION}_linux_amd64.zip \ - && unzip terraform_${TF_VERSION}_linux_amd64.zip + && unzip -o terraform-ls_${TF_LS_VERSION}_linux_amd64.zip \ + && unzip -o terraform_${TF_VERSION}_linux_amd64.zip -FROM alpine +FROM alpine:3.22.1 COPY --from=build /build/terraform-ls /usr/bin/terraform-ls COPY --from=build /build/terraform /usr/bin/terraform diff --git a/servers/tsserver/Dockerfile b/servers/tsserver/Dockerfile index 7f051f1..35bc380 100644 --- a/servers/tsserver/Dockerfile +++ b/servers/tsserver/Dockerfile @@ -1,11 +1,14 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=4.3.4 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - typescript-language-server \ - @vue/typescript-plugin \ - typescript + typescript-language-server@${VERSION} \ + @vue/typescript-plugin@2.1.6 \ + typescript@5.5.4 CMD [ "typescript-language-server", "--stdio" ] diff --git a/servers/volar/Dockerfile b/servers/volar/Dockerfile index feda3fa..6d45f14 100644 --- a/servers/volar/Dockerfile +++ b/servers/volar/Dockerfile @@ -1,9 +1,9 @@ -FROM alpine +FROM alpine:3.22.1 -RUN apk add --no-cache nodejs npm +ARG VERSION=1.8.11 +LABEL version="${VERSION}" -ENV VERSION=1.8.11 - -RUN npm install -g @vue/language-server@$VERSION +RUN apk add --no-cache nodejs=22.16.0-r2 npm=11.3.0-r0 && \ + npm install -g @vue/language-server@${VERSION} CMD [ "vue-language-server", "--stdio" ] diff --git a/servers/vuels/Dockerfile b/servers/vuels/Dockerfile index d605f29..6f42b34 100644 --- a/servers/vuels/Dockerfile +++ b/servers/vuels/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=0.8.5 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - vls + vls@${VERSION} CMD [ "vls", "--stdio" ] diff --git a/servers/yamlls/Dockerfile b/servers/yamlls/Dockerfile index 01aaaa8..71b1310 100644 --- a/servers/yamlls/Dockerfile +++ b/servers/yamlls/Dockerfile @@ -1,9 +1,12 @@ -FROM alpine +FROM alpine:3.22.1 + +ARG VERSION=1.18.0 +LABEL version="${VERSION}" RUN apk add --no-cache \ - nodejs \ - npm \ + nodejs=22.16.0-r2 \ + npm=11.3.0-r0 \ && npm install -g \ - yaml-language-server + yaml-language-server@${VERSION} CMD [ "yaml-language-server", "--stdio" ]