Hey, yeah, docker-compose works in the same setup. A few things that’ll save time:
- In the Dockerfile, install Docker CE plus the Docker Compose plugin. For docker-in-docker, also add
fuse-overlayfsandiptables-legacy. - In the
startcommand inenvironment.json, start the daemon withsudo service docker start. Bring up your compose services withdocker compose upinstartor viaterminals, but don’t putdocker compose upin theinstallor update script. That’s explicitly not recommended. - Pass through the required env vars and secrets like DB creds and API keys so the containers start correctly.
Docs section Running Docker with a recommended Dockerfile: Cloud Environment Setup | Cursor Docs
Another useful thread about the compose setup: Cloud agents with docker-compose
If the daemon won’t start in the agent environment, check the Docker daemon config at /etc/docker/daemon.json. For docker-in-docker you sometimes need to disable the default bridge or iptables. If anything still isn’t picked up, send your environment.json, Dockerfile (or compose yaml), and the build log and we can take a look together.