Add DevContainer support

What does this MR do and why?

This MR adds DevContainer support to the GitLab Docs project, along with documentation on how to use it.

DevContainers provide a consistent, reproducible development environment with all dependencies pre-installed, which solves several problems:

  1. Reduces the "works on my machine" problem by ensuring everyone has the same development environment.
  2. Simplifies onboarding for new contributors who don't have to manually install dependencies.
  3. Isolates project dependencies from the host system, preventing version conflicts.
  4. Provides a complete, ready-to-use environment with all tools and extensions configured.

The implementation uses the official Microsoft DevContainer for Node.js as a base, adds Docker support for linting Dockerfiles, and configures the necessary VS Code extensions. The setup uses mise from the project to manage tool versions, ensuring consistency with the existing approach.

Screenshots, screen recordings, or links to review app

image

Screenshot showing VS Code running in the DevContainer with the GitLab Docs site preview

How to set up and validate locally

  1. Configure Docker Desktop (or equivalent) on your machine.
  2. Install VS Code and the Dev Containers extension.
  3. Clone this repository and open it in VS Code.
  4. When prompted, click "Reopen in Container" or use the Command Palette (F1) to select "Dev Containers: Reopen in Container".
  5. Once inside the container, run:
    make clone-docs-projects
    make view
  6. Access the site at http://localhost:1313 to verify it works.

Merge request acceptance checklist

Edited by Zakaria Fatahi

Merge request reports

Loading