Run Cursor IDE in Docker with Ubuntu base image. Enjoy!!
This project provides a Docker container that allows you to run Cursor, an AI-first code editor, in an Ubuntu environment. This is particularly useful for:
- Running Cursor in a containerized environment
- Testing Cursor in Ubuntu without modifying your host system
- Ensuring consistent development environment across different machines
The prebuild version is availabe on docker hub as buglord/cursord:latest
On Mac, XQuartz is slow so I decided to build the full desktop version, Ubuntu and CentOS are available.
- Ubuntu Desktop version: buglord/cursord:ubuntu
- CentOS Desktop version: buglord/cursord:centos
-
Prerequisites:
- Docker Desktop for Mac installed
- XQuartz installed (for X11 forwarding)
-
Install XQuartz:
brew install --cask xquartz
-
Configure XQuartz:
- Open XQuartz
- Go to XQuartz > Preferences
- Go to the Security tab
- Check "Allow connections from network clients"
- Restart XQuartz
-
Allow X11 forwarding:
xhost +localhost
-
Build and run the container:
docker build -t cursord . docker run -e DISPLAY=host.docker.internal:0 -v /tmp/.X11-unix:/tmp/.X11-unix cursord
-
Prerequisites:
- Docker installed
- X11 installed (comes with most Linux distributions)
-
Allow X11 forwarding:
xhost +local:
-
Build and run the container:
docker build -t cursord . docker run -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix cursord
Last updated: January 8, 2025