Cloud Agents: inconsistent Docker / Compose bootstrap on AnyOS desktop — “dockerd + compose” vs “docker not installed”; how does this relate to .devcontainer image:?

Hey, this isn’t a bug. It’s expected behavior, it’s just not obvious. Here’s why.

Docker isn’t included in the default Cloud Agents image. So by default, it’s not in the environment. If you sometimes still see dockerd in htop, that’s due to snapshot caching. If a previous session’s setup agent managed to install Docker and that state got cached, the next session can start from that snapshot. If it starts from the base image, Docker won’t be there. That’s why it feels non-deterministic.

To make Docker available deterministically, you need to:

  1. Create .cursor/Dockerfile that installs Docker CE, Docker Compose, fuse-overlayfs, and iptables-legacy.
  2. Reference it in .cursor/environment.json.
  3. Add sudo service docker start to the start command.

A full working recipe with all packages and an environment.json example is in the docs: https://cursor.com/docs/cloud-agent/setup#running-docker

Answers to your questions:

  • Guaranteed / best-effort / tier-dependent? It’s opt-in. It doesn’t depend on tier or pool. You enable it via your own Dockerfile.
  • Why are two sessions different? Snapshot caching, see above.
  • Can I always land on a Docker-capable agent? Yes, via your own .cursor/Dockerfile. After that, Docker is guaranteed in every session.
  • Any relation to .devcontainer image:? No. Cloud Agents don’t use the devcontainer spec. We use a separate format, .cursor/environment.json. The image: field from devcontainer.json is ignored.

Related thread: Cloud agents with docker-compose

If anything fails after you set up .cursor/Dockerfile, post the setup phase logs and the Request ID and we’ll take a look.