Docker | PHP |PECL -> Package does not have REST XML Available error. Try this…

Tony Mucci
Code Kings
Published in
Feb 13, 2024

--

TL;DR — Add a DNS entry to your Docker Engine. I ended up using Google & Cloudflare

"dns" : ["8.8.8.8","1.1.1.1"]

THE PROBLEM

When I was trying to have my Docker build install a PHP Pecl package I ran into this issue that blocked my build.

THE SOLUTION

Because I was building this on a corporate box, it seems the DNS on the VPN (Cisco Umbrella) was a bit odd and missing generic DNS servers for Pecl’s resolution. With this fix, I was able to successfully build my container with the Pecl package inside.

"dns" : ["8.8.8.8","1.1.1.1"]

Happy Coding!

--

--

Tony Mucci
Code Kings

Co-founder of SimpliCourt, dree, My Company Tools, and Eklect Enterprises