Cloud agents with docker-compose

I can’t install docker currently in my cloud agent, which is not allowing me to run my docker compose that is needed to setup mysql, and my php server.

I kept getting errors like so:

```
Err:4 http://security.ubuntu.com/ubuntu noble-security InRelease Connection failed [IP: 91.189.92.23 80]
```

Docker isn’t pre-installed in cloud agents by default. To use Docker (and Docker Compose), you’ll need to set up a custom environment using .cursor/Dockerfile and .cursor/environment.json in your repo.

The docs walk through the full setup here: Running Docker (Cloud Agent Setup)

In short:

  1. Create a .cursor/Dockerfile that installs Docker CE, Docker Compose, fuse-overlayfs, and iptables-legacy (the docs have a recommended Dockerfile you can expand and copy)

  2. Create a .cursor/environment.json referencing that Dockerfile

  3. Add sudo service docker start to the start command in your environment.json so the Docker daemon is running when the agent starts

For a working example, check out this community repo: cursor-cloud-agent-dind

Once Docker is running, you can start your MySQL and PHP containers via docker compose up either in the start command or by letting the agent run it during its task.