What is the best way to get docker in docker supported for background agents? I have pytests fixtures which leverage testcontainers to spin up services like clickhouse. I would like the background agent to be able to run these tests, but I cannot seem to get docker in docker working since I don’t see how to pass the privileged flag.
What is the recommended path for a devcontainer that supports docker test containers?
The start command can often be skipped. One common case where you want to use it is if your dev environment relies on docker, in which case you would want to put sudo service docker start in the start command.
I tried replicating this locally and the only way to avoid the “ulimit: error setting limit” error was to use --privileged and --ulimit nofile=65535:65535 like this:
docker run --privileged --ulimit nofile=65535:65535 -it test bash
I don’t think Cursor’s configuration file allows customizing these options though, so still not sure how to get this to work with background agents.
Did you end up figuring this one out? Figured out how to install docker & docker compose in the first place, but when running service docker start I’m getting the ulimit error you have above.
I have the same problem here. My tests depends on using testcontainers to spin-up two ephemeral databases and currently the background agent is unable to run tests. Installing the docker client is simple, but there should be a docker daemon running. Curious about an official solution.
hi @Dan_Claroni this is because you are trying to use a Docker based MCP which requires the installation of docker (another software to run the MCP you want).