Enabling Daemon in Continuous Integration

Hi, I’m a little bit confused regarding suggestion from the docs. It mentions of

Since Gradle 3.0, we enable Daemon by default and recommend using it for both developers’ machines and Continuous Integration servers.

My question is, in my case, my CI is using a new docker container each time it starts a new build. So is it still applicable for me to enable the daemon? Thanks before.

If you only run exactly one build, it won’t make a difference. If you run multiple gradle commands in the container, you’ll actually get a speedup. So no matter what it won’t hurt :slight_smile:

1 Like

Is there any way to tell gradle where the daemon is? I’m thinking some sort of socket file.

I have the exact same scenarios as @fchristysen, my CI starts a new container each time a build happens so starting a new daemon doesn’t make any difference…but…i wonder if is possible to have the daemon run on the host and from inside the container tell gradle how to connect to the daemon (hope this makes sense). You can see this sort of solution a lot of containers world, usually is done by exporting a volume in the container.

i’ve spend quite a bit of time on google and this forum searching for something like this and I can’t find anything. is it possible?