Skip to content

Commit 98a460b

Browse files
committed
docs: add Dev Container setup instructions to README and create DEVCONTAINER.md
1 parent 007d6ea commit 98a460b

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,3 +188,7 @@ See [examples](examples/README.md)
188188

189189
- [MCP Specification](https://spec.modelcontextprotocol.io/specification/2024-11-05/)
190190
- [Schema](https://github.com/modelcontextprotocol/specification/blob/main/schema/2024-11-05/schema.ts)
191+
192+
## Development with Dev Container
193+
194+
See [docs/DEVCONTAINER.md](docs/DEVCONTAINER.md) for instructions on using Dev Container for development.

docs/DEVCONTAINER.md

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Development with Dev Container and GitHub Codespaces
2+
3+
This repository provides a Dev Container to easily set up a development environment. Using Dev Container allows you to work in a consistent development environment with pre-configured dependencies and tools, whether locally or in the cloud with GitHub Codespaces.
4+
5+
### Prerequisites
6+
7+
**For Local Development:**
8+
9+
* [Docker Desktop](https://www.docker.com/products/docker-desktop/) or any other compatible container runtime (e.g., Podman, OrbStack) installed.
10+
* [Visual Studio Code](https://code.visualstudio.com/) with the [Remote - Containers extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) installed.
11+
12+
**For GitHub Codespaces:**
13+
14+
* A GitHub account.
15+
16+
### Starting Dev Container
17+
18+
**Using Visual Studio Code (Local):**
19+
20+
1. Clone the repository.
21+
2. Open the repository in Visual Studio Code.
22+
3. Open the command palette in Visual Studio Code (`Ctrl + Shift + P` or `Cmd + Shift + P`) and execute `Dev Containers: Reopen in Container`.
23+
24+
**Using GitHub Codespaces (Cloud):**
25+
26+
1. Navigate to the repository on GitHub.
27+
2. Click the "<> Code" button.
28+
3. Select the "Codespaces" tab.
29+
4. Click "Create codespace on main" (or your desired branch).
30+
31+
### Dev Container Configuration
32+
33+
Dev Container settings are configured in `.devcontainer/devcontainer.json`. In this file, you can set the Docker image to use, extensions to install, port forwarding, and more. This configuration is used both for local development and GitHub Codespaces.
34+
35+
### Development
36+
37+
Once the Dev Container is started, you can proceed with development as usual. The container already has the necessary tools and libraries installed. In GitHub Codespaces, you will have a fully configured VS Code in your browser or desktop application.
38+
39+
### Stopping Dev Container
40+
41+
**Using Visual Studio Code (Local):**
42+
43+
To stop the Dev Container, open the command palette in Visual Studio Code and execute `Remote: Close Remote Connection`.
44+
45+
**Using GitHub Codespaces (Cloud):**
46+
47+
GitHub Codespaces will automatically stop after a period of inactivity. You can also manually stop the codespace from the Codespaces menu in GitHub.
48+
49+
### More Information
50+
51+
* [Visual Studio Code Dev Containers](https://code.visualstudio.com/docs/remote/containers)
52+
* [Dev Container Specification](https://containers.dev/implementors/json_reference/)
53+
* [GitHub Codespaces](https://github.com/features/codespaces)
54+
55+
This document describes the basic usage of Dev Container and GitHub Codespaces. Add project-specific settings and procedures as needed.

0 commit comments

Comments
 (0)