I've never used Cloudflare I have used Nitropack for CDN but I'm not sure what you mean with turn off the proxy from Cloudflare.
Either way what your error implies is that you're not being able to resolve DNS (or the PHP process isn't). hence my question about the resolv.conf and how DNS is working for your organization.