The source project of this merge request has been removed.
Add DevContainer support
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
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:
- Reduces the "works on my machine" problem by ensuring everyone has the same development environment.
- Simplifies onboarding for new contributors who don't have to manually install dependencies.
- Isolates project dependencies from the host system, preventing version conflicts.
- 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
Screenshot showing VS Code running in the DevContainer with the GitLab Docs site preview
How to set up and validate locally
- Configure Docker Desktop (or equivalent) on your machine.
- Install VS Code and the Dev Containers extension.
- Clone this repository and open it in VS Code.
- When prompted, click "Reopen in Container" or use the Command Palette (F1) to select "Dev Containers: Reopen in Container".
- Once inside the container, run:
make clone-docs-projects make view - Access the site at http://localhost:1313 to verify it works.
Merge request acceptance checklist
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Zakaria Fatahi
