Correct, I’m just pointing out that you don’t need to install two agents on the same machine. This is just general advice
Mounting the host machine Docker socket is not recommended, since this plugin was explicitly created to use Docker-in-Docker, to avoid both security issues and race conditions on the host machine (as you are experiencing).
I recommend reading this thread for more details. You can actually use a caching plugin to cache your layers as a safer alternative to mounting the host machine socket.
Alternatively, you can use
purge: false which instructs the plugin to disable the docker prune command. Note that you would still be using the plugin in a manner that is unsupported, and you could still run into issues, but it would solve the particular error you posted above.
I hope this helps!