lspcontainers/dockerfiles

July 17, 2025 ยท View on GitHub

๐Ÿš€ Dockerfiles for Language Server Protocol (LSP) servers - Containerized language servers for use with lspcontainers.nvim.

Docker Hub Build Status License

๐ŸŒŸ What is this?

This repository provides production-ready Docker containers for 25+ Language Server Protocol (LSP) servers, designed to work seamlessly with the lspcontainers.nvim Neovim plugin.

๐ŸŽฏ How it works:

  1. Docker containers provide isolated, reproducible LSP server environments
  2. lspcontainers.nvim plugin automatically manages these containers in Neovim
  3. Zero local installation - no need to install language servers on your system

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

๐Ÿ› ๏ธ Supported Language Servers

LanguageServerContainerVersion
Bashbash-language-serverlspcontainers/bash-language-serverVersion
C/C++clangdlspcontainers/clangd-language-serverVersion
C#omnisharplspcontainers/omnisharp-language-serverVersion
CSS/SCSS/Lessvscode-css-languageserverlspcontainers/css-language-serverVersion
Denodeno-lsplspcontainers/deno-language-serverVersion
Dockerdockerfile-lslspcontainers/docker-language-serverVersion
ESLinteslint-languageserverlspcontainers/eslint-language-serverVersion
Gogoplslspcontainers/goplsVersion
GraphQLgraphql-language-servicelspcontainers/graphql-language-serverVersion
HTMLhtml-languageserverlspcontainers/html-language-serverVersion
JavaScript/TypeScripttypescript-language-serverlspcontainers/typescript-language-serverVersion
JSONvscode-json-languageserverlspcontainers/json-language-serverVersion
Lualua-language-serverlspcontainers/lua-language-serverVersion
PHPintelephenselspcontainers/php-language-serverVersion
PowerShellpowershell-eslspcontainers/powershell-language-serverVersion
Prismaprisma-language-serverlspcontainers/prisma-language-serverVersion
Pythonpylsplspcontainers/python-lsp-serverVersion
Pythonpyrightlspcontainers/pyright-language-serverVersion
Rubysolargraphlspcontainers/ruby-language-serverVersion
Rustrust-analyzerlspcontainers/rust-analyzerVersion
Sveltesvelte-language-serverlspcontainers/svelte-language-serverVersion
Tailwind CSStailwindcss-language-serverlspcontainers/tailwindcss-language-serverVersion
Terraformterraform-lslspcontainers/terraform-lsVersion
Vuevolarlspcontainers/volar-language-serverVersion
Vuevuels (legacy)lspcontainers/vue-language-serverVersion
XMLlemminxlspcontainers/xml-language-serverVersion
YAMLyaml-language-serverlspcontainers/yaml-language-serverVersion

๐Ÿš€ Quick Start

These containers are designed to work with the lspcontainers.nvim plugin.

๐Ÿ‘‰ See the plugin documentation for installation and setup instructions.

Building Containers Locally

# 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

๐Ÿ—๏ธ 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!

๐Ÿ”ง 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:
    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
# 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:

# 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:

# 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 and join our community of developers making language servers more accessible!