Support development inside Docker container (devcontainer, codespaces)
This PR adds support for development inside Docker containers via VSCode's devcontainers and GitHub Codespaces. These changes make it easier for new contributors to get started with FerretDB development without needing to install Go and other dependencies on their local machine.
Changes:
-
Added
.devcontainerdirectory with configuration files:-
devcontainer.json- Configuration for VSCode and GitHub Codespaces -
Dockerfile- Container definition for the dev environment -
setup.sh- Helper script for initial setup -
README.md- Documentation for the devcontainer setup
-
-
Created
docker-compose.devcontainer.ymlto integrate the development container with existing PostgreSQL and MongoDB containers -
Updated
CONTRIBUTING.mdto document both development approaches:- Traditional method (running FerretDB on host, dependencies in Docker)
- Development container method (everything runs in containers)
These changes maintain the existing development workflow while adding an alternative that simplifies the setup for new contributors.
How to use:
- Clone the repository
- Open in VSCode with Remote Container extension installed
- VSCode will prompt to "Reopen in Container" or use Command Palette: "Remote-Containers: Reopen in Container"
- The development container will be built and started
- Use
taskcommands as usual (task build-host,task run, etc.)
Alternatively, use GitHub Codespaces by clicking the "Code" button on the GitHub repository and selecting "Open with Codespaces".
Fixes #190.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.