mongo/docs/devcontainer/README.md

3.9 KiB

MongoDB Development with Dev Containers

⚠️ BETA: The devcontainer setup is currently in Beta stage. Please report issues and feedback to the team.

📚 Documentation Index

This is the comprehensive guide for developing MongoDB using Dev Containers. Choose the guide that best fits your needs:

🚀 Getting Started

Start here if you're new to devcontainers or MongoDB development

  • Prerequisites and system requirements
  • Step-by-step setup instructions
  • First-time configuration
  • Verifying your setup

🏗️ Architecture & Technical Details

Understand how the devcontainer works under the hood

  • Container architecture overview
  • Dockerfile breakdown
  • Volume management and persistence
  • Toolchain installation process
  • VS Code integration details
  • Feature system explained

🔧 Troubleshooting

Having issues? Check here for solutions

  • Common problems and fixes
  • Performance optimization
  • Platform-specific issues (macOS, Windows, Linux)
  • Docker provider comparison
  • Debugging tips

💡 Advanced Usage

Power user features and customization

  • Customizing your devcontainer
  • Working with multiple containers
  • Remote execution with EngFlow
  • Custom toolchain versions
  • Integration with CI/CD
  • Extending with additional features

FAQ

Quick answers to common questions

  • Why use devcontainers?
  • Named volumes vs bind mounts
  • Updating the container
  • Data persistence
  • And more...

VS Code Documentation

MongoDB Documentation

What are Dev Containers?

Dev Containers provide a consistent, reproducible development environment using Docker containers. This ensures:

  • Consistency: Everyone works with identical tooling and dependencies
  • Isolation: Your host system stays clean
  • Portability: Develop from any machine with Docker
  • Quick Setup: Get started in minutes, not hours

Benefits for MongoDB Development

The MongoDB devcontainer provides:

  1. Pre-configured Build Environment: All build tools, compilers, and dependencies ready to use
  2. MongoDB Toolchain: Specific GCC/Clang versions required for building MongoDB
  3. IDE Integration: VS Code settings optimized for C++, Python, JavaScript, and Bazel
  4. Persistent Caching: Build artifacts and Python environments preserved across sessions
  5. EngFlow Support: Built-in support for remote execution and caching

System Requirements

  • Docker: Allocate as much RAM as possible to Docker (leave ~4-8 GB for host OS)
  • CPU: Allocate as many cores as possible to Docker (leave 1-2 for host OS)
  • Disk Space: 60+ GB recommended for container, tools, and build artifacts
  • VS Code: Latest version with Remote - Containers extension
  • Operating System:
    • macOS (ARM64 or x86_64)
    • Windows 10/11 with WSL2
    • Linux (x86_64 or ARM64)

Getting Help

  • Documentation Issues: Open an issue or PR in the MongoDB repository
  • Devcontainer Problems: Check Troubleshooting Guide
  • General Questions: See FAQ

Ready to get started?Follow the Getting Started Guide