-
Notifications
You must be signed in to change notification settings - Fork 34
Revive project changes #106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8f82510
feat: init claude configuration
erikreinert 2b1d621
feat(github): rename file for changes
erikreinert e048e9f
feat: update all Dockerfiles to use static versioned base images
erikreinert 00b603b
feat: pin all package versions for reproducible builds
erikreinert ae71554
fix(terraformls): resolve unzip conflict and update versions
erikreinert abd9924
fix(powershell_es): update to latest PowerShell Editor Services version
erikreinert f6b3aba
fix(gopls): update Go tools to latest stable versions
erikreinert 3e22a5f
feat: revamp README.md to attract new contributors
erikreinert ea76a28
docs: refocus README on lspcontainers.nvim integration
erikreinert 1fbafbd
feat: implement version tagging system for Docker images
erikreinert ee38a86
fix(lint)
erikreinert b11a0e0
docs: add version badges to language servers table
erikreinert 7192518
feat: add multi-architecture build support to CI
erikreinert 48878db
fix: handle PowerShell ES ARM64 compatibility in multi-arch builds
erikreinert d728880
refactor: remove scheduled nightly builds
erikreinert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 <server>` - 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/<server>/Dockerfile | ||
| ``` | ||
|
|
||
| ## Architecture | ||
|
|
||
| ### Repository Structure | ||
| ``` | ||
| servers/ | ||
| ├── <server-name>/ | ||
| │ ├── 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 <server>` | ||
| 6. Verify with hadolint: `docker run --rm -v $(pwd):/code -w /code hadolint/hadolint:latest-alpine servers/<server>/Dockerfile` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -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 | ||||||
| [](https://hub.docker.com/u/lspcontainers) | ||||||
| [](https://github.com/lspcontainers/dockerfiles/actions) | ||||||
| [](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 <server>` 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` |  | | ||||||
| | **C/C++** | clangd | `lspcontainers/clangd-language-server` |  | | ||||||
| | **C#** | omnisharp | `lspcontainers/omnisharp-language-server` |  | | ||||||
| | **CSS/SCSS/Less** | vscode-css-languageserver | `lspcontainers/css-language-server` |  | | ||||||
| | **Deno** | deno-lsp | `lspcontainers/deno-language-server` |  | | ||||||
| | **Docker** | dockerfile-ls | `lspcontainers/docker-language-server` |  | | ||||||
| | **ESLint** | eslint-languageserver | `lspcontainers/eslint-language-server` |  | | ||||||
| | **Go** | gopls | `lspcontainers/gopls` |  | | ||||||
| | **GraphQL** | graphql-language-service | `lspcontainers/graphql-language-server` |  | | ||||||
| | **HTML** | html-languageserver | `lspcontainers/html-language-server` |  | | ||||||
| | **JavaScript/TypeScript** | typescript-language-server | `lspcontainers/typescript-language-server` |  | | ||||||
| | **JSON** | vscode-json-languageserver | `lspcontainers/json-language-server` |  | | ||||||
| | **Lua** | lua-language-server | `lspcontainers/lua-language-server` |  | | ||||||
| | **PHP** | intelephense | `lspcontainers/php-language-server` |  | | ||||||
| | **PowerShell** | powershell-es | `lspcontainers/powershell-language-server` |  | | ||||||
| | **Prisma** | prisma-language-server | `lspcontainers/prisma-language-server` |  | | ||||||
| | **Python** | pylsp | `lspcontainers/python-lsp-server` |  | | ||||||
| | **Python** | pyright | `lspcontainers/pyright-language-server` |  | | ||||||
| | **Ruby** | solargraph | `lspcontainers/ruby-language-server` |  | | ||||||
| | **Rust** | rust-analyzer | `lspcontainers/rust-analyzer` |  | | ||||||
| | **Svelte** | svelte-language-server | `lspcontainers/svelte-language-server` |  | | ||||||
| | **Tailwind CSS** | tailwindcss-language-server | `lspcontainers/tailwindcss-language-server` |  | | ||||||
| | **Terraform** | terraform-ls | `lspcontainers/terraform-ls` |  | | ||||||
| | **Vue** | volar | `lspcontainers/volar-language-server` |  | | ||||||
| | **Vue** | vuels (legacy) | `lspcontainers/vue-language-server` |  | | ||||||
| | **XML** | lemminx | `lspcontainers/xml-language-server` |  | | ||||||
| | **YAML** | yaml-language-server | `lspcontainers/yaml-language-server` |  | | ||||||
|
|
||||||
| 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 | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ditto:
Suggested change
|
||||||
| # 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! | ||||||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| bashls: | ||
| image: lspcontainers/bash-language-server | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pedantic: Use
shhere: the following script is regular shell script and doesn't require bash: