Setup Development Environment
We use Cursor with the Anysphere Containers extension. This lets you use a Docker container as a full-featured development environment. A devcontainer.json file in Core tells Cursor how to access (or create) a development container with a well-defined tool and runtime stack.
To get started try the following:
- Install Cursor
- Install Docker Desktop
- Start Docker Desktop
- PC users: Windows limits resources to WSL 2 (Memory/CPU), this limit can be configured in your .wslconfig file.
- Start Cursor and add Anysphere Containers Extension
- Run
Git: Clone
from the Command Palette (Cmd/Ctrl + Shift + P) - Choose GitHub (You'll need to authenticate with GitHub), then enter
JesusFilm/core
- Select an appropriate local directory to clone the repository to.
- If prompted by Cursor, press "Open" or "Open Repository"
- Cursor will start building the dev container. A progress notification provides status updates.
- After the build completes, Cursor will automatically connect to the container. You can now work with the repository source code in this independent environment as you would if you had cloned the code locally.
- Optional: Increase your Docker resource allocations - use the guidance under "Container is running slowly or crashing on Mac" below; this will help prevent crashing from running out of resources.
Common Issues
Container is running slowly or crashing on Mac
As a guide, you should be able to run comfortably with the following limits:
- Open Docker Desktop
- Go to Settings -> Resources -> Advanced and set the following:
- CPU limit: 8
- Memory limit: 24GB
- Swap limit: 1GB
- Click 'Apply & Restart'
For even greater resource allocations, you could optionally use this example:
- CPU limit: 12
- Memory limit: 32GB
- Swap limit: 4GB
"Docker not found" or "Docker daemon not started" when starting Cursor after updating docker
- Open Docker Desktop
- Go to Settings -> Advanced and ensure the following settings are selected:
- System (requires password)
- Allow the default Docker socket to be used (requires password)
- Allow privileged port mapping (requires password)
- Automatically check configuration
Git: Clone
does not appear in the command palette
- Simply restart Cursor and try again